lxf hace 3 meses
padre
commit
3bfc38a7f3

+ 31 - 2
jy-ui/src/views/business/contract/fundReceived/index.vue

@@ -13,7 +13,8 @@ import {
   deleteApi,
   confirmArrivalAccountApi
 } from '@/api/business/contract/fundReceived'
-import {getPageApi as getCapitalAccountPageApi} from "@/api/business/capital/account";
+import { getPageApi as getCapitalAccountPageApi } from '@/api/business/capital/account'
+import Detail from '@/views/business/contract/info/detail.vue'
 
 const queryRef = ref<InstanceType<typeof AForm>>()
 const formRef = ref<InstanceType<typeof AForm>>()
@@ -28,6 +29,7 @@ const formData = ref<StrAnyObj>({})
 
 const dialogTitle = ref<string>('')
 const dialogVisible = ref<boolean>(false)
+const detailDialog = ref<boolean>(false)
 
 const queryConfig: FormConfigType[] = [
   {
@@ -62,7 +64,7 @@ const toolbarConfig: ToolbarConfigType[] = [
 
 const columnConfig: ColumnConfigType[] = [
   {
-    prop: 'contractNo',
+    slot: 'contractNo',
     label: '合同'
   },
   {
@@ -178,6 +180,13 @@ function formSubmit() {
 function formClosed() {
   formRef.value?.resetFields()
 }
+function clickContract(item: StrAnyObjArr) {
+  formData.value = {
+    id: item.contractId
+  }
+  detailDialog.value = true
+  dialogTitle.value = '详情'
+}
 </script>
 
 <template>
@@ -198,6 +207,15 @@ function formClosed() {
       @page-size-change="getPage"
       @selection-change="tableSelectionChange"
     >
+      <template #contractNo="{ row }">
+        <div>
+          <a
+            style="color: #409eff; cursor: pointer; word-break: break-all"
+            @click="clickContract(row)"
+            >{{ row.contractNo }}</a
+          >
+        </div>
+      </template>
     </a-table>
 
     <a-dialog
@@ -208,5 +226,16 @@ function formClosed() {
     >
       <a-form ref="formRef" v-model="formData" :config="formConfig" :span="24"> </a-form>
     </a-dialog>
+
+    <a-dialog
+      v-if="detailDialog"
+      v-model="detailDialog"
+      :title="detailTitle"
+      @closed="formClosed"
+      style="width: 900px"
+      :footer="false"
+    >
+      <Detail :rowData="formData"></Detail>
+    </a-dialog>
   </div>
 </template>

+ 5 - 1
jy-ui/src/views/business/contract/info/detail.vue

@@ -151,6 +151,8 @@
 </template>
 
 <script setup>
+import { getDetailApi } from '@/api/business/contract/info'
+
 const { proxy } = getCurrentInstance()
 const props = defineProps({
   rowData: Object,
@@ -204,7 +206,9 @@ const calculateAmount = () => {
   return amount
 }
 onMounted(() => {
-  formData.data = props.rowData
+  getDetailApi({ id: props.rowData.id }).then((res) => {
+    formData.data = res
+  })
 })
 </script>
 

+ 4 - 5
jy-ui/src/views/business/contract/info/index.vue

@@ -90,11 +90,9 @@ const columnConfig: ColumnConfigType[] = [
       {
         common: 'detail',
         click(row) {
-          getDetailApi({ id: row.id }).then((resp: StrAnyObj) => {
-            formData.value = resp
-            dialogVisible.value = true
-            dialogTitle.value = '详情'
-          })
+          formData.value = row
+          dialogVisible.value = true
+          dialogTitle.value = '详情'
         }
       }
     ]
@@ -462,6 +460,7 @@ function handleRemove(idList: string[]) {
       @submit="formSubmit"
       @closed="formClosed"
       style="width: 900px"
+      :footer="false"
     >
       <Detail :rowData="formData"></Detail>
     </a-dialog>