Просмотр исходного кода

Merge branch 'master' of http://47.101.159.18:3000/Muchinfo/MTP20_WEB_GLOBAL

li.shaoyi 2 лет назад
Родитель
Сommit
7b564cb79a

+ 1 - 1
public/config/appconfig.json

@@ -1,6 +1,6 @@
 {
   "version": "1.0.0",
   "versionCode": "100000",
-  "apiUrl": "http://192.168.31.204:8080/cfg?key=test_204",
+  "apiUrl": "http://192.168.31.175:8080/cfg?key=test_175",
   "shwoRegister": true
 }

+ 1 - 1
src/business/bank/index.ts

@@ -310,7 +310,7 @@ export function useDoCusBankExtendConfigs(extendbiztype?: number) {
                 if (res.data.length != 0) {
                     configs.value = res.data.map(obj =>({
                         ...obj,
-                        value: ''
+                        value: obj.fieldcode === 'legal_name' ? (useStore.userInfo?.legalpersonname ?? '') : ''
                     }))
                 }
             })

+ 17 - 2
src/packages/mobile/views/bank/sign/Index.vue

@@ -19,9 +19,10 @@
         <template #footer>
             <div class="g-form__footer inset" v-if="bankInfo">
                 <Button type="warning" round block @click="formSubmit"
-                    v-if="bankInfo.signstatus === SignStatus.Signed">解约</Button>
+                    v-if="bankInfo.signstatus === SignStatus.Signed  && cusBank?.canrelease === 1">解约</Button>
                 <Button type="danger" round block @click="showComponent(true)"
-                    v-if="[SignStatus.Unsigned, SignStatus.Refuse, SignStatus.Signed].includes(bankInfo.signstatus)">修改</Button>
+                    v-if="[SignStatus.Unsigned, SignStatus.Refuse, SignStatus.Signed].includes(bankInfo.signstatus) && 
+                                 cusBank?.canmodifysigninfo === 1">修改</Button>
             </div>
         </template>
         <component ref="componentRef" v-bind="{ isedit }" :is="componentMap.get(componentId)" @closed="closeComponent" v-if="componentId" />
@@ -36,17 +37,31 @@ import { useComponent } from '@/hooks/component'
 import { getSignStatusName, SignStatus } from '@/constants/bank'
 import { useDoCancelBankSign } from '@/business/bank'
 import { useNavigation } from '@mobile/router/navigation'
+import { useRequest } from '@/hooks/request'
+import { queryCusBankSignBank } from '@/services/api/bank'
+import { shallowRef } from 'vue'
 
 const componentMap = new Map<string, unknown>([
     ['edit', defineAsyncComponent(() => import('./components/edit/Index.vue'))],
 ])
 
+const cusBank = shallowRef<Model.CusBankSignBankRsp>()
 const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => formRefresh())
 const { cancelSubmit, formRefresh, bankInfo } = useDoCancelBankSign()
 const { router } = useNavigation()
 /// 是否修改
 const isedit = ref(false)
 
+/// 查询托管银行信息
+useRequest(queryCusBankSignBank, {
+    onSuccess: (res) => {
+        /// 签约状态
+        if (res.data.length != 0) {
+            cusBank.value = res.data[0]
+        }
+    }
+})
+
 const formSubmit = () => {
     dialog({
         message: '确认解约?',

+ 30 - 19
src/packages/mobile/views/bank/sign/components/edit/Index.vue

@@ -16,26 +16,37 @@
                         :rules="formRules.BankAccountNo" />
                     <Field name="AccountName" label="姓名" readonly v-model="formData.AccountName" placeholder="请输入银行卡账户名"
                         :rules="formRules.AccountName" />
-                    <Field name="MobilePhone" label="手机号码" readonly v-model="formData.MobilePhone" placeholder="请输入手机号码" />
+                    <Field name="MobilePhone" 
+                           label="手机号码" 
+                           :readonly="userStore.userInfo?.mobile2 != ''" 
+                           maxlength="50" 
+                            v-model="formData.MobilePhone" 
+                            placeholder="请输入手机号码" />
                     <template v-for="(item, index) in configs" :key="index">
-                        <Field v-if="(item.fieldcode === 'verify_code') && 
-                                     (item.usabletype === 1) || 
-                                     (item.usabletype === 2 && userStore.userInfo?.userinfotype === 2) || 
-                                     (item.usabletype === 3 && userStore.userInfo?.userinfotype === 1)" 
-                         v-model="item.value"  type="digit" name="vcode" :label="item.fieldname" placeholder="必填" autocomplete="off"
-                            :rules="item.fieldname">
-                            <template #button>
-                                <Button size="small" type="danger" :disabled="isCountdown" @click="sendVerifyCode">
-                                    <span v-if="isCountdown">重新发送({{ currentTime.seconds }})</span>
-                                    <span v-else>获取验证码</span>
-                                </Button>
-                            </template>
-                        </Field>
-                        <Field v-else-if="(item.usabletype === 1) || 
-                         (item.usabletype === 2 && userStore.userInfo?.userinfotype === 2) || 
-                         (item.usabletype === 3 && userStore.userInfo?.userinfotype === 1)"
-                            :name="item.fieldcode" :label="item.fieldname" v-model="item.value"
-                            :placeholder="`请输入${item.fieldname}`" />
+                        <template v-if="(item.fieldcode === 'verify_code')">
+                            <Field v-if="(bankInfo === undefined) && 
+                                        ((item.usabletype === 1) || 
+                                        (item.usabletype === 2 && userStore.userInfo?.userinfotype === 2) || 
+                                        (item.usabletype === 3 && userStore.userInfo?.userinfotype === 1))" 
+                            v-model="item.value"  type="digit" name="vcode" :label="item.fieldname" placeholder="必填" autocomplete="off"
+                                :rules="item.fieldname">
+                                <template #button>
+                                    <Button size="small" type="danger" :disabled="isCountdown" @click="sendVerifyCode">
+                                        <span v-if="isCountdown">重新发送({{ currentTime.seconds }})</span>
+                                        <span v-else>获取验证码</span>
+                                    </Button>
+                                </template>
+                            </Field>
+                        </template>
+                        <template v-else>
+                            <Field v-if="(item.usabletype === 1) || 
+                            (item.usabletype === 2 && userStore.userInfo?.userinfotype === 2) || 
+                            (item.usabletype === 3 && userStore.userInfo?.userinfotype === 1)"
+                                :name="item.fieldcode" :label="item.fieldname" :readonly="item.fieldcode === 'legal_name' && userStore.userInfo?.legalpersonname != ''" 
+                                v-model="item.value"
+                                maxlength="50"
+                                :placeholder="`请输入${item.fieldname}`" />
+                        </template>
                     </template>
                 </CellGroup>
             </Form>

+ 29 - 25
src/packages/pc/views/account/sign/components/sign/index.vue

@@ -1,6 +1,6 @@
 <!-- 账户管理-签约账号管理-签约 -->
 <template>
-    <app-drawer :title="bankInfo ? '修改签约账户' : '添加签约账户'" :width="800" v-model:show="show" :loading="loading"
+    <app-drawer :title="bankInfo?.signstatus != undefined ? '修改签约账户' : '添加签约账户'" :width="800" v-model:show="show" :loading="loading"
         :refresh="refresh">
         <el-form ref="formRef" class="el-form--horizontal" label-width="120px" :model="formData" :rules="formRules">
             <el-form-item label="开户银行" prop="OpenBankAccId">
@@ -12,39 +12,43 @@
                 <el-input name="BankAccountNo" placeholder="银行卡号" :maxlength="30" v-model="formData.BankAccountNo"
                     :rules="formRules.BankAccountNo" />
             </el-form-item>
-            <el-form-item label="名" prop="AccountName">
+            <el-form-item label="名" prop="AccountName">
                 <el-input name="AccountName" readonly placeholder="银行卡账户名" v-model="formData.AccountName"
                     :rules="formRules.AccountName" />
             </el-form-item>
             <el-form-item label="手机号码" prop="MobilePhone">
-                <el-input name="MobilePhone" readonly placeholder="请输入手机号码" v-model="formData.MobilePhone" />
+                <el-input name="MobilePhone" :readonly="userStore.userInfo?.mobile2 != ''" maxlength="50" placeholder="请输入手机号码" v-model="formData.MobilePhone" />
             </el-form-item>
             <template v-for="(item, index) in configs" :key="index">
-                <el-form-item :label="item.fieldname" :prop="item.fieldcode" 
-                   v-if="(item.fieldcode === 'verify_code') && 
-                         (item.usabletype === 1) || 
-                         (item.usabletype === 2 && userStore.userInfo?.userinfotype === 2) || 
-                         (item.usabletype === 3 && userStore.userInfo?.userinfotype === 1)">
-                    <el-input placeholder="请输入短信验证码" type="number" v-model="item.value" :rules="formRules.vcode">
-                        <template #append>
-                            <el-button size="small" type="primary" :disabled="isCountdown" @click="sendVerifyCode">
-                                <span v-if="isCountdown">重新发送({{ seconds }})</span>
-                                <span v-else>获取验证码</span>
-                            </el-button>
-                        </template>
-                    </el-input>
-                </el-form-item>
-                <el-form-item :label="item.fieldname" :prop="item.fieldcode"
-                    v-else-if="(item.usabletype === 1) || 
-                         (item.usabletype === 2 && userStore.userInfo?.userinfotype === 2) || 
-                         (item.usabletype === 3 && userStore.userInfo?.userinfotype === 1)">
-                    <el-input :name="item.fieldcode" placeholder="请必须输入" v-model="item.value" />
-                </el-form-item>
+                <template v-if="(item.fieldcode === 'verify_code')">
+                    <el-form-item :label="item.fieldname" :prop="item.fieldcode" 
+                    v-if="(bankInfo === undefined) && 
+                            ((item.usabletype === 1) || 
+                            (item.usabletype === 2 && userStore.userInfo?.userinfotype === 2) || 
+                            (item.usabletype === 3 && userStore.userInfo?.userinfotype === 1))">
+                        <el-input placeholder="请必须输入" type="number" v-model="item.value" :rules="formRules.vcode">
+                            <template #append>
+                                <el-button size="small" type="primary" :disabled="isCountdown" @click="sendVerifyCode">
+                                    <span v-if="isCountdown">重新发送({{ seconds }})</span>
+                                    <span v-else>获取验证码</span>
+                                </el-button>
+                            </template>
+                        </el-input>
+                    </el-form-item>
+                    </template>
+                <template v-else>
+                    <el-form-item :label="item.fieldname" :prop="item.fieldcode"
+                            v-if="(item.usabletype === 1) || 
+                                (item.usabletype === 2 && userStore.userInfo?.userinfotype === 2) || 
+                                (item.usabletype === 3 && userStore.userInfo?.userinfotype === 1)">
+                        <el-input :readonly="item.fieldcode === 'legal_name' && userStore.userInfo?.legalpersonname != ''" maxlength="50" :name="item.fieldcode" placeholder="请必须输入" v-model="item.value" />
+                    </el-form-item>
+                </template>
             </template>
         </el-form>
         <template #footer>
             <el-button type="info" @click="onCancel(false)">取消</el-button>
-            <el-button type="primary" @click="formSubmit">{{ bankInfo ? '修改' : '提交' }}</el-button>
+            <el-button type="primary" @click="formSubmit">{{ bankInfo?.signstatus != undefined ? '修改' : '提交' }}</el-button>
         </template>
     </app-drawer>
 </template>
@@ -160,7 +164,7 @@ const formSubmit = () => {
                 formData.extend_info = JSON.stringify(obj)
 
                 onSubmit().then(() => {
-                    ElMessage.success(bankInfo ? '签约信息修改成功' : '签约提交成功,请耐心等待审核。')
+                    ElMessage.success(bankInfo.value?.signstatus != undefined ? '签约信息修改成功' : '签约提交成功,请耐心等待审核。')
                     onCancel(true)
                 }).catch((err) => {
                     const { getErrorInfoByCode } = useErrorInfoStore()

+ 16 - 4
src/packages/pc/views/account/sign/index.vue

@@ -22,9 +22,10 @@
         <!-- 展开行 -->
         <template #expand="{ row }">
             <div class="buttonbar">
-                <el-button v-if="row.signstatus === SignStatus.Signed" type="danger" size="small"
+                <el-button v-if="row.signstatus === SignStatus.Signed && cusBank?.canrelease === 1" type="danger" size="small"
                     @click="openComponent('cancel')">解约</el-button>
-                <el-button v-if="[SignStatus.Unsigned, SignStatus.Refuse, SignStatus.Signed].includes(row.signstatus)"
+                <el-button v-if="[SignStatus.Unsigned, SignStatus.Refuse, SignStatus.Signed].includes(row.signstatus) && 
+                                 cusBank?.canmodifysigninfo === 1"
                     type="primary" size="small" @click="openComponent('sign')">修改</el-button>
             </div>
         </template>
@@ -38,7 +39,7 @@ import { shallowRef, defineAsyncComponent, onMounted } from 'vue'
 import { useComponent } from '@/hooks/component'
 import { useComposeTable } from '@pc/components/base/table'
 import { useRequest } from '@/hooks/request'
-import { queryBankAccountSign } from '@/services/api/bank'
+import { queryBankAccountSign, queryCusBankSignBank } from '@/services/api/bank'
 import { getSignStatusName, SignStatus } from '@/constants/bank'
 import { getCertificateTypeCodeName } from '@/constants/account'
 import { queryUserAccount } from '@/services/api/account'
@@ -54,6 +55,7 @@ const componentMap = new Map<string, unknown>([
 
 const authStatus = shallowRef(AuthStatus.Certified) // 实名认证状态
 const signStatus = shallowRef(SignStatus.Unsigned)
+const cusBank = shallowRef<Model.CusBankSignBankRsp>()
 
 const { rowKey, expandKeys, rowClick, selectedRow } = useComposeTable<Model.BankAccountSignRsp>({ rowKey: 'applyexchticket' })
 const { loading, dataList, run } = useRequest(queryBankAccountSign, {
@@ -65,13 +67,23 @@ const { loading, dataList, run } = useRequest(queryBankAccountSign, {
     }
 })
 
+/// 查询托管银行信息
+useRequest(queryCusBankSignBank, {
+    onSuccess: (res) => {
+        /// 签约状态
+        if (res.data.length != 0) {
+            cusBank.value = res.data[0]
+        }
+    }
+})
+
 const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
     run()
 })
 
 const tableColumns = shallowRef<Model.TableColumn[]>([
     { prop: 'accountcode', label: '资金账号' },
-    { prop: 'accountname', label: '账号名' },
+    { prop: 'accountname', label: '名' },
     { prop: 'cardtype', label: '证件类型' },
     { prop: 'cardno', label: '证件号码' },
     { prop: 'cusbankname', label: '托管银行' },