|
|
@@ -29,7 +29,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import { shallowRef, PropType } from 'vue'
|
|
|
+import { shallowRef, PropType, onMounted } from 'vue'
|
|
|
import { CellGroup, Button, Field, Form, FormInstance, FieldRule } from 'vant'
|
|
|
import { dialog, fullloading } from '@/utils/vant'
|
|
|
import { handleRequestBigNumber } from '@/filters'
|
|
|
@@ -39,6 +39,7 @@ import AppModal from '@/components/base/modal/index.vue'
|
|
|
import AppContact from '@mobile/components/modules/contact/index.vue'
|
|
|
import AppReceipt from '@mobile/components/modules/receipt/index.vue'
|
|
|
import { getReceiptTypeName } from '@/constants/receipt'
|
|
|
+import { BuyOrSell } from '@/constants/order'
|
|
|
|
|
|
const showModal = shallowRef(true)
|
|
|
// 是否刷新父组件数据
|
|
|
@@ -167,9 +168,24 @@ const closed = (isRefresh = false) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+onMounted(() => {
|
|
|
+ try {
|
|
|
+ const { buyorsell, buyerinfo, sellerinfo } = props.selectedRow
|
|
|
+ const info = buyorsell === BuyOrSell.Buy ? buyerinfo : sellerinfo
|
|
|
+
|
|
|
+ if (info) {
|
|
|
+ const res = JSON.parse(info)
|
|
|
+ Contract.value = res.ContactInfo
|
|
|
+ Receive.value = res.ReceiveInfo
|
|
|
+ Receipt.value = res.ReceiptInfo
|
|
|
+ }
|
|
|
+ } catch (err) {
|
|
|
+ console.error(err)
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
// 暴露组件属性给父组件调用
|
|
|
defineExpose({
|
|
|
closed,
|
|
|
})
|
|
|
-
|
|
|
</script>
|