li.shaoyi 7 maanden geleden
bovenliggende
commit
953eaaa2ed

+ 31 - 5
src/business/common/index.ts

@@ -1,20 +1,46 @@
 import { ref, onUnmounted } from 'vue'
-import { queryConfig } from '@/services/api/common'
+import { queryConfig, queryParam } from '@/services/api/common'
 
-export function getConfigValue(configid: number) {
+// 获取系统配置
+export function getSystemConfig(configid: number) {
     const configValue = ref('')
 
     const controller = new AbortController()
 
-    // 获取配置项
-    queryConfig({
+    const fetchConfig = queryConfig({
         controller,
         data: { configid }
     }).then((res) => {
         configValue.value = res.data.configvalue
+        return res.data
     })
 
     onUnmounted(() => controller.abort())
 
-    return configValue
+    return {
+        fetchConfig,
+        configValue
+    }
+}
+
+// 获取系统参数
+export function getSystemParam(paramid: string) {
+    const paramValue = ref('')
+
+    const controller = new AbortController()
+
+    const fetchParam = queryParam({
+        controller,
+        data: { paramid }
+    }).then((res) => {
+        paramValue.value = res.data
+        return res.data
+    })
+
+    onUnmounted(() => controller.abort())
+
+    return {
+        fetchParam,
+        paramValue
+    }
 }

+ 2 - 1
src/packages/pc/views/account/fundacct/components/bankstatement/index.vue

@@ -40,6 +40,7 @@
 <script lang="ts" setup>
 import { shallowRef, PropType } from 'vue'
 import { ElMessage, FormRules } from 'element-plus'
+import { formatDate } from '@/filters'
 import { useRequest } from '@/hooks/request'
 import { useDataFilter } from '@/hooks/datatable-v2'
 import { queryAmountStream } from '@/services/api/account'
@@ -80,7 +81,7 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { field: 'amount', label: 'account.fundacct.bankstatement.amount' },
     { field: 'balance', label: 'account.fundacct.bankstatement.balance' },
     { field: 'currentBalance', label: 'account.fundacct.bankstatement.currentBalance' },
-    { field: 'createTime', label: 'account.fundacct.bankstatement.createTime' },
+    { field: 'createTime', label: 'account.fundacct.bankstatement.createTime', formatValue: (val) => formatDate(val) },
     { field: 'amountAdjustTypeName', label: 'account.fundacct.bankstatement.amountAdjustTypeName' },
 ])
 

+ 12 - 6
src/packages/pc/views/account/fundacct/components/sign/cancel/index.vue

@@ -1,12 +1,15 @@
 <!-- 账号管理-资金账户管理-银行签约信息-解约 -->
 <template>
-    <app-drawer :title="t('account.fundacct.sign.cancel.title')" width="900" v-model:show="show" :refresh="refresh" :loading="loading">
-        <app-table-details :title="t('common.baseinfo')" :data="formData" :label-width="200" :cell-props="detailProps1" :column="2" />
-        <app-table-details :title="t('common.extendinfo')" :data="formData.extend" :label-width="200" :cell-props="detailProps2"
-            :column="2" v-if="expandableList.length" />
+    <app-drawer :title="t('account.fundacct.sign.cancel.title')" width="900" v-model:show="show" :refresh="refresh"
+        :loading="loading">
+        <app-table-details :title="t('common.baseinfo')" :data="formData" :label-width="200" :cell-props="detailProps1"
+            :column="2" />
+        <app-table-details :title="t('common.extendinfo')" :data="formData.extend" :label-width="200"
+            :cell-props="detailProps2" :column="2" v-if="expandableList.length" />
         <template #footer>
             <el-button @click="onCancel(false)">{{ t('operation.close') }}</el-button>
-            <el-button type="primary" @click="onSubmit(1)" v-if="selectedItem.canBindCard === 1">{{ t('account.fundacct.sign.cancel.broker') }}</el-button>
+            <el-button type="primary" @click="onSubmit(1)" v-if="selectedItem.canBindCard === 1">{{
+                t('account.fundacct.sign.cancel.broker') }}</el-button>
             <el-button type="primary" @click="onSubmit(2)">{{ t('account.fundacct.sign.cancel.unbind') }}</el-button>
         </template>
     </app-drawer>
@@ -15,6 +18,7 @@
 <script lang="ts" setup>
 import { shallowRef, reactive, PropType, toRaw, computed } from 'vue'
 import { ElMessage, ElMessageBox } from 'element-plus'
+import { useEnum } from '@/hooks/enum'
 import { decryptAES } from '@/services/crypto'
 import { useRequest } from '@/hooks/request'
 import { getSignBankById, dealAccountSign } from '@/services/api/account'
@@ -31,6 +35,8 @@ const props = defineProps({
     }
 })
 
+const certificatetypeEnum = useEnum('certificatetype') // 证件类型
+
 const { global: { t } } = i18n
 const show = shallowRef(true)
 const refresh = shallowRef(false)
@@ -81,7 +87,7 @@ const { dataList: expandableList, run: getExpandableList } = useRequest(queryBoo
 
 const detailProps1: CellProp[] = [
     { prop: 'accounttype', label: 'account.fundacct.sign.cancel.accounttype', formatValue: (val) => val === 1 ? 'account.fundacct.sign.cancel.person' : 'account.fundacct.sign.cancel.companny' },
-    { prop: 'certtype', label: 'account.fundacct.sign.cancel.certtype' },
+    { prop: 'certtype', label: 'account.fundacct.sign.cancel.certtype', formatValue: (val) => certificatetypeEnum.getEnumTypeName(val) },
     { prop: 'cusbankid', label: 'account.fundacct.sign.cancel.cusbankid', formatValue: () => props.selectedItem.cusBankName },
     { prop: 'certid', label: 'account.fundacct.sign.cancel.certid' },
     { prop: 'exbankname', label: 'account.fundacct.sign.cancel.exbankname' },

+ 10 - 2
src/packages/pc/views/admin/user/components/edit/index.vue

@@ -2,7 +2,8 @@
 <template>
     <app-drawer :title="t('admin.user.edit.title')" width="480" v-model:show="show" :refresh="refresh"
         :loading="loading">
-        <el-form ref="formRef" class="el-form--vertical" label-width="80px" :model="formData" :rules="formRules" :show-message="false">
+        <el-form ref="formRef" class="el-form--vertical" label-width="80px" :model="formData" :rules="formRules"
+            :show-message="false">
             <el-form-item :label="t('admin.user.edit.logincode')" prop="logincode">
                 <el-input v-model="formData.logincode" maxlength="50" :placeholder="t('common.pleaseenter')"
                     :disabled="!!record?.autoid" />
@@ -37,6 +38,7 @@
 import { ref, PropType, toRaw, onMounted } from 'vue'
 import { ElMessage, FormInstance, FormRules } from 'element-plus'
 import { useRequest } from '@/hooks/request'
+import { getSystemParam } from '@/business/common'
 import { dealUserMsg, querySystemmanagerDetail, queryRoleByAdd } from '@/services/api/admin'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
 import { i18n } from '@/stores'
@@ -53,9 +55,11 @@ const show = ref(true)
 const refresh = ref(false)
 
 const formData = ref<Partial<Model.DealUserMsgReq>>({
-    password: '123456'
+    password: ''
 })
 
+const { fetchParam } = getSystemParam('046') // 默认密码
+
 const { dataList } = useRequest(queryRoleByAdd)
 
 const { loading, run } = useRequest(querySystemmanagerDetail, {
@@ -110,5 +114,9 @@ onMounted(() => {
     if (autoId) {
         run({ autoId })
     }
+
+    fetchParam.then((data) => {
+        formData.value.password = data
+    })
 })
 </script>

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

@@ -130,7 +130,8 @@
                         <div>
                             <app-upload v-model="uploadFiles.otherUrl" :max-size="uploadConfig.maxFileSize" />
                             <a href="/template/法人授权书模板.zip" target="_blank"
-                                style="color: royalblue; text-decoration: underline;">{{ t('investor.manage.user.edit.template') }}</a>
+                                style="color: royalblue; text-decoration: underline;">{{
+                                    t('investor.manage.user.edit.template') }}</a>
                         </div>
                     </el-form-item>
                 </template>
@@ -154,7 +155,7 @@ import { handleNoneValue, parseFilePaths, extractFilePaths } from '@/filters'
 import { uploadConfig } from '@/constants/common'
 import { useEnum } from '@/hooks/enum'
 import { useRequest } from '@/hooks/request'
-import { getConfigValue } from '@/business/common'
+import { getSystemConfig } from '@/business/common'
 import { investorEdit, queryInvestorListDetail } from '@/services/api/investor'
 import { UserInfoType } from '@/constants/member'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
@@ -196,8 +197,8 @@ const uploadFiles = reactive<{
     otherUrl: []
 })
 
-const config54 = getConfigValue(54)
-const config78 = getConfigValue(78)
+const { configValue: config54 } = getSystemConfig(54)
+const { configValue: config78 } = getSystemConfig(78)
 
 // 是否个人
 const isPerson = computed(() => formData.value.userinfoDetailVo.userinfoType === UserInfoType.Personal)

+ 19 - 6
src/packages/pc/views/member/institution/open/components/details/agree.vue

@@ -1,18 +1,22 @@
 <!-- 会员机构管理-机构管理-机构开户申请-审核通过 -->
 <template>
-    <app-drawer :title="t('member.institution.open.details.title2')" width="480" v-model:show="show" :loading="loading" :refresh="refresh">
+    <app-drawer :title="t('member.institution.open.details.title2')" width="480" v-model:show="show" :loading="loading"
+        :refresh="refresh">
         <el-form ref="formRef" label-width="130px" :model="formData" :rules="formRules" :show-message="false">
             <el-form-item :label="t('member.institution.open.details.areacode')" prop="areacode">
-                <el-input type="number" v-model="formData.areacode" :placeholder="t('member.institution.open.details.tips1')" />
+                <el-input type="number" v-model="formData.areacode"
+                    :placeholder="t('member.institution.open.details.tips1')" />
             </el-form-item>
             <el-form-item :label="t('member.institution.open.details.smlogincode')" prop="smlogincode">
-                <el-input v-model="formData.smlogincode" maxlength="50" :placeholder="t('member.institution.open.details.tips2')" />
+                <el-input v-model="formData.smlogincode" maxlength="50"
+                    :placeholder="t('member.institution.open.details.tips2')" />
             </el-form-item>
             <el-form-item :label="t('member.institution.open.details.loginname')" prop="loginname">
                 <el-input v-model="formData.loginname" maxlength="50" :placeholder="t('common.pleaseenter')" />
             </el-form-item>
             <el-form-item :label="t('member.institution.open.details.smpassword')" prop="smpassword">
-                <el-input v-model="formData.smpassword" maxlength="50" :placeholder="t('common.pleaseenter')" disabled />
+                <el-input v-model="formData.smpassword" maxlength="50" :placeholder="t('common.pleaseenter')"
+                    disabled />
             </el-form-item>
         </el-form>
         <template #footer>
@@ -23,8 +27,9 @@
 </template>
 
 <script lang="ts" setup>
-import { ref, PropType, toRaw } from 'vue'
+import { ref, PropType, toRaw, onMounted } from 'vue'
 import { ElMessage, FormInstance, FormRules } from 'element-plus'
+import { getSystemParam } from '@/business/common'
 import { wskhUserinfoApproved } from '@/services/api/member'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
 import { i18n } from '@/stores'
@@ -45,9 +50,11 @@ const loading = ref(false)
 const formData = ref<Partial<Member.MemberDetail>>({
     userid: props.record.userid,
     auditflag: 1,
-    smpassword: '123456'
+    smpassword: ''
 })
 
+const { fetchParam } = getSystemParam('046') // 默认密码
+
 // 表单验证规则
 const formRules: FormRules = {
     areacode: [{ required: true, min: 4, max: 4 }],
@@ -87,4 +94,10 @@ const onSubmit = () => {
         }
     })
 }
+
+onMounted(() => {
+    fetchParam.then((data) => {
+        formData.value.smpassword = data
+    })
+})
 </script>

+ 5 - 3
src/packages/pc/views/member/subinstitution/manage/components/edit/index.vue

@@ -129,7 +129,7 @@
                 </el-form-item>
                 <el-form-item :label="t('member.subinstitution.manage.edit.smpassword')" prop="smpassword"
                     v-if="!record">
-                    <span>123456</span>
+                    <span>{{ handleNoneValue(paramValue) }}</span>
                 </el-form-item>
             </fieldset>
             <fieldset class="g-fieldset el-form--horizontal">
@@ -164,11 +164,12 @@
 <script lang="ts" setup>
 import { ref, reactive, PropType, onMounted, computed } from 'vue'
 import { ElMessage, FormInstance, FormRules, UploadUserFile } from 'element-plus'
-import { parseFilePaths, extractFilePaths } from '@/filters'
+import { handleNoneValue, parseFilePaths, extractFilePaths } from '@/filters'
 import { uploadConfig } from '@/constants/common'
 import { decryptAES } from '@/services/crypto'
 import { useEnum } from '@/hooks/enum'
 import { useRequest } from '@/hooks/request'
+import { getSystemParam } from '@/business/common'
 import { organSonViewson, organSonAdd, organSonSave, organSonEdit } from '@/services/api/member'
 import { UserInfoType, Gender } from '@/constants/member'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
@@ -215,7 +216,6 @@ const uploadFiles = reactive<{
     attachment2: []
 })
 
-
 // 是否个人
 const isPerson = computed(() => formData.value.userinfotype === UserInfoType.Personal)
 
@@ -226,6 +226,8 @@ const formData = ref<Partial<Member.OrganSonUpdateReq>>({
     usertype: 3
 })
 
+const { paramValue } = getSystemParam('046') // 默认密码
+
 const { loading, run } = useRequest(organSonViewson, {
     manual: true,
     onSuccess: ((res) => {

+ 7 - 0
src/services/api/common/index.ts

@@ -111,4 +111,11 @@ export function queryAccountId(options: CommonFetchOptions<{ request: Model.Acco
  */
 export function queryAccountIdForMarket(options: CommonFetchOptions<{ request: Model.AccountIdReq; response: Model.AccountIdRsp; }>) {
     return httpClient.commonRequest('/common/queryAccountIdForMarket', 'get', options)
+}
+
+/**
+ * 根据系统参数id获取相关配置信息
+ */
+export function queryParam(options: CommonFetchOptions<{ request: Model.ParamReq; response: string; }>) {
+    return httpClient.commonRequest('/common/queryParam', 'get', options)
 }

+ 5 - 0
src/types/model/common.d.ts

@@ -443,4 +443,9 @@ declare namespace Model {
         usedmargin: number; // 占用保证金
         userid: number; // 用户ID
     }
+
+    /** 根据系统参数id获取相关配置信息 请求 */
+    interface ParamReq {
+        paramid: string
+    }
 }