Handy_Cao il y a 2 ans
Parent
commit
4bc44c3971

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

@@ -19,10 +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  && cusBank.canrelease === 1">解约</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) && 
-                                 cusBank.canmodifysigninfo === 1">修改</Button>
+                                 cusBank?.canmodifysigninfo === 1">修改</Button>
             </div>
         </template>
         <component ref="componentRef" v-bind="{ isedit }" :is="componentMap.get(componentId)" @closed="closeComponent" v-if="componentId" />
@@ -45,7 +45,7 @@ const componentMap = new Map<string, unknown>([
     ['edit', defineAsyncComponent(() => import('./components/edit/Index.vue'))],
 ])
 
-const cusBank = shallowRef<Model.CusBankSignBankRsp>({})
+const cusBank = shallowRef<Model.CusBankSignBankRsp>()
 const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => formRefresh())
 const { cancelSubmit, formRefresh, bankInfo } = useDoCancelBankSign()
 const { router } = useNavigation()

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

@@ -37,7 +37,7 @@
                             <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' && item.value != ''" v-model="item.value"
+                                :name="item.fieldcode" :label="item.fieldname" :readonly="item.fieldcode === 'legal_name' && userStore.userInfo?.legalpersonname != ''" v-model="item.value"
                                 :placeholder="`请输入${item.fieldname}`" />
                         </template>
                     </template>

+ 4 - 4
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">
@@ -41,14 +41,14 @@
                             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' && item.value != ''" :name="item.fieldcode" placeholder="请必须输入" v-model="item.value" />
+                        <el-input :readonly="item.fieldcode === 'legal_name' && userStore.userInfo?.legalpersonname != ''" :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>
@@ -164,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()

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

@@ -22,10 +22,10 @@
         <!-- 展开行 -->
         <template #expand="{ row }">
             <div class="buttonbar">
-                <el-button v-if="row.signstatus === SignStatus.Signed && cusBank.canrelease === 1" 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) && 
-                                 cusBank.canmodifysigninfo === 1"
+                                 cusBank?.canmodifysigninfo === 1"
                     type="primary" size="small" @click="openComponent('sign')">修改</el-button>
             </div>
         </template>
@@ -35,7 +35,7 @@
 </template>
 
 <script lang="ts" setup>
-import { ref, shallowRef, defineAsyncComponent, onMounted } from 'vue'
+import { shallowRef, defineAsyncComponent, onMounted } from 'vue'
 import { useComponent } from '@/hooks/component'
 import { useComposeTable } from '@pc/components/base/table'
 import { useRequest } from '@/hooks/request'
@@ -55,7 +55,7 @@ const componentMap = new Map<string, unknown>([
 
 const authStatus = shallowRef(AuthStatus.Certified) // 实名认证状态
 const signStatus = shallowRef(SignStatus.Unsigned)
-const cusBank = ref<Model.CusBankSignBankRsp>({})
+const cusBank = shallowRef<Model.CusBankSignBankRsp>()
 
 const { rowKey, expandKeys, rowClick, selectedRow } = useComposeTable<Model.BankAccountSignRsp>({ rowKey: 'applyexchticket' })
 const { loading, dataList, run } = useRequest(queryBankAccountSign, {