|
|
@@ -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>
|