Handy_Cao 2 лет назад
Родитель
Сommit
0e0dd1f6e4

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

@@ -20,11 +20,11 @@
             <div class="g-form__footer" v-if="bankInfo">
                 <Button type="warning" round block @click="formSubmit"
                     v-if="bankInfo.signstatus === SignStatus.Signed">解约</Button>
-                <Button type="danger" round block @click="openComponent('edit')"
+                <Button type="danger" round block @click="showComponent('edit')"
                     v-if="[SignStatus.Unsigned, SignStatus.Refuse, SignStatus.Signed, SignStatus.Rescinded].includes(bankInfo.signstatus)">修改</Button>
             </div>
         </template>
-        <component ref="componentRef" :is="componentMap.get(componentId)" @closed="closeComponent" v-if="componentId" />
+        <component ref="componentRef" v-bind="{ isedit }" :is="componentMap.get(componentId)" @closed="closeComponent" v-if="componentId" />
     </app-view>
 </template>
 
@@ -37,6 +37,7 @@ import { getSignStatusName, SignStatus } from '@/constants/bank'
 import { useDoCancelBankSign } from '@/business/bank'
 import { useNavigation } from '../../../router/navigation'
 import { useErrorInfoStore } from '@/stores'
+import { shallowRef } from 'vue'
 
 const componentMap = new Map<string, unknown>([
     ['edit', defineAsyncComponent(() => import('./components/edit/Index.vue'))],
@@ -45,6 +46,8 @@ const componentMap = new Map<string, unknown>([
 const { componentRef, componentId, openComponent, closeComponent } = useComponent()
 const { cancelSubmit, bankInfo, formRefresh } = useDoCancelBankSign()
 const { router } = useNavigation()
+/// 是否为编辑
+const isedit = shallowRef(false)
 
 const formSubmit = () => {
     dialog({
@@ -65,6 +68,11 @@ const formSubmit = () => {
     })
 }
 
+const showComponent = (code: string) => {
+    isedit.value = true
+    openComponent(code)
+}
+
 onActivated(() => formRefresh())
 
 </script>

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

@@ -2,7 +2,7 @@
     <app-modal direction="right" height="100%" v-model:show="showModal" :refresh="refresh">
         <app-view class="g-form">
             <template #header>
-                <app-navbar :title="bankInfo ? '修改签约账户' : '添加签约账户'" @back="closed" />
+                <app-navbar :title="isedit ? '修改签约账户' : '添加签约账户'" @back="closed" />
             </template>
             <Form ref="formRef" class="g-form__container" @submit="formSubmit">
                 <CellGroup inset>
@@ -39,13 +39,19 @@ import AppSelect from '../../../../../components/base/select/index.vue'
 import { validateRules } from '@/constants/regex'
 import { useErrorInfoStore } from '@/stores'
 import AppModal from '@/components/base/modal/index.vue'
-import { number } from 'echarts'
 
 const { formData, onSubmit, banklist, bankInfo } = useDoBankSign()
 const showModal = shallowRef(true)
 const refresh = shallowRef(false) // 是否刷新父组件数据
 const formRef = shallowRef<FormInstance>()
 
+const props = defineProps({
+    isedit: {
+        type: Boolean,
+        required: true,
+    }
+})
+
 // 表单验证规则
 const formRules: { [key in keyof Proto.t2bBankSignReq]?: FieldRule[] } = {
     OpenBankAccId: [{
@@ -78,7 +84,7 @@ const formSubmit = () => {
     fullloading((hideLoading) => {
         onSubmit().then(() => {
             hideLoading()
-            dialog(bankInfo ? '签约信息修改成功' : '签约提交成功,请耐心等待审核。').then(() => {
+            dialog(props.isedit ? '签约信息修改提交成功' : '签约提交成功,请耐心等待审核。').then(() => {
                 closed(true)
             })
         }).catch((err) => {

+ 1 - 1
src/packages/pc/views/account/receipt/index.vue

@@ -52,7 +52,7 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { prop: 'receiptbank', label: '开户银行' },
     { prop: 'receiptaccount', label: '银行账号' },
     { prop: 'contactinfo', label: '企业电话' },
-    { prop: 'information', label: '企业信息' },
+    { prop: 'address', label: '企业地址' },
 ])
 
 filterOptons.buttonList = [