|
@@ -243,6 +243,9 @@ const props = defineProps({
|
|
|
},
|
|
|
})
|
|
|
|
|
|
+//事件
|
|
|
+const emit = defineEmits(['close', 'next'])
|
|
|
+
|
|
|
//渲染完成
|
|
|
onMounted(() => {
|
|
|
getDataApi()
|
|
@@ -296,7 +299,10 @@ const getContractInfo = async () => {
|
|
|
contractForm.value = {}
|
|
|
if (isNullES(cid)) return
|
|
|
const { data } = await mainApi.detail(cid)
|
|
|
- contractForm.value = getObjValue(data)
|
|
|
+ const res = getObjValue(data)
|
|
|
+ const info = getObjValue(res.meterContractInfo)
|
|
|
+ res.meterContractInfo = info
|
|
|
+ contractForm.value = res
|
|
|
}
|
|
|
|
|
|
//获取合同段基本信息
|
|
@@ -308,7 +314,10 @@ const getContractInfo2 = async () => {
|
|
|
id: cid,
|
|
|
contractType: type,
|
|
|
})
|
|
|
- contractForm.value = getObjValue(data)
|
|
|
+ const res = getObjValue(data)
|
|
|
+ const info = getObjValue(res.meterContractInfo)
|
|
|
+ res.meterContractInfo = info
|
|
|
+ contractForm.value = res
|
|
|
}
|
|
|
|
|
|
//获取业务字典
|
|
@@ -377,13 +386,23 @@ const getContractRelation = async () => {
|
|
|
}
|
|
|
|
|
|
//保存并退出
|
|
|
-const saveAndExit = () => {
|
|
|
-
|
|
|
+const saveAndExit = async () => {
|
|
|
+ const isRes = await saveDataApi()
|
|
|
+ if (!isRes) return
|
|
|
+ emit('close')
|
|
|
}
|
|
|
|
|
|
//保存并进入下一步
|
|
|
-const saveAndNextStep = () => {
|
|
|
+const saveAndNextStep = async () => {
|
|
|
+ const isRes = await saveDataApi()
|
|
|
+ if (!isRes) return
|
|
|
+ emit('next')
|
|
|
+}
|
|
|
|
|
|
+//保存数据
|
|
|
+const submitLoading = ref(false)
|
|
|
+const saveDataApi = async () => {
|
|
|
+ console.log(contractForm.value)
|
|
|
}
|
|
|
</script>
|
|
|
|