3b3f7a83 by xukangle

fix

1 parent ce9f82c7
...@@ -12,7 +12,6 @@ export const getEntryList = (params) => request({ ...@@ -12,7 +12,6 @@ export const getEntryList = (params) => request({
12 export const deleteEntryAll = (params) => request({ 12 export const deleteEntryAll = (params) => request({
13 url: `${import.meta.env.VITE_API_NEW_PORTAL}/da-intable/delete?guid=${params}`, 13 url: `${import.meta.env.VITE_API_NEW_PORTAL}/da-intable/delete?guid=${params}`,
14 method: 'delete', 14 method: 'delete',
15 data: params
16 }) 15 })
17 /** 获取资产入表信息新增 */ 16 /** 获取资产入表信息新增 */
18 export const createEntry = (params) => request({ 17 export const createEntry = (params) => request({
...@@ -34,6 +33,12 @@ export const getDocumentList = (params) => request({ ...@@ -34,6 +33,12 @@ export const getDocumentList = (params) => request({
34 method: 'post', 33 method: 'post',
35 data: params 34 data: params
36 }) 35 })
36 /**资产详情 */
37 export const getAssetDetail = (data) => request({
38 url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/intable/get-table-select`,
39 method: 'post',
40 data
41 })
37 42
38 /** 资产融资管理 */ 43 /** 资产融资管理 */
39 /** 获取资产融资信息列表 */ 44 /** 获取资产融资信息列表 */
......
...@@ -11,9 +11,11 @@ import { ...@@ -11,9 +11,11 @@ import {
11 deleteEntryAll, 11 deleteEntryAll,
12 createEntry, 12 createEntry,
13 intableUpdate, 13 intableUpdate,
14 getDocumentList 14 getDocumentList,
15 getAssetDetail
15 } from "@/api/modules/dataTransaction"; 16 } from "@/api/modules/dataTransaction";
16 import { getDamCatalogTable } from '@/api/modules/dataAsset'; 17 import { getDamCatalogTable } from '@/api/modules/dataAsset';
18 import { da } from 'element-plus/es/locale';
17 const route = useRoute() 19 const route = useRoute()
18 const userStore = useUserStore(); 20 const userStore = useUserStore();
19 const searchItemList = ref([ 21 const searchItemList = ref([
...@@ -68,7 +70,8 @@ const columnInfo = ref({ ...@@ -68,7 +70,8 @@ const columnInfo = ref({
68 issuingEntityName: "", 70 issuingEntityName: "",
69 issuingEntityGuid: "", 71 issuingEntityGuid: "",
70 companyGuid: "", 72 companyGuid: "",
71 registerGuid: "" 73 registerGuid: "",
74 damGuid: ""
72 }) 75 })
73 const companyOption = ref<any>([ 76 const companyOption = ref<any>([
74 { 77 {
...@@ -95,6 +98,16 @@ const colums = [ ...@@ -95,6 +98,16 @@ const colums = [
95 selectOption: () => companyOption.value 98 selectOption: () => companyOption.value
96 }, 99 },
97 { 100 {
101 prop: "daName",
102 label: "资产名称",
103 width: "180",
104 componentType: "select",
105 componentDisabled: false,
106 //editDisabled:()=> tableInfo.value.flag==="edit" ? true :false,
107 selectOption: () => assetsOption.value,
108 selectKey: "daName",
109 },
110 {
98 prop: "intableTime", 111 prop: "intableTime",
99 label: "入表时间", 112 label: "入表时间",
100 width: "130", 113 width: "130",
...@@ -134,16 +147,7 @@ const colums = [ ...@@ -134,16 +147,7 @@ const colums = [
134 147
135 } 148 }
136 }, 149 },
137 { 150
138 prop: "daName",
139 label: "资产名称",
140 width: "180",
141 componentType: "select",
142 componentDisabled: false,
143 //editDisabled:()=> tableInfo.value.flag==="edit" ? true :false,
144 selectOption: () => assetsOption.value,
145 selectKey: "damName",
146 },
147 { 151 {
148 prop: "daCode", 152 prop: "daCode",
149 label: "资产编号", 153 label: "资产编号",
...@@ -190,13 +194,29 @@ const documentList = async () => { ...@@ -190,13 +194,29 @@ const documentList = async () => {
190 194
191 return Promise.resolve() 195 return Promise.resolve()
192 } 196 }
197 // const params = {
198 // daName: row.damName,
199 // type: 1,
200 // companyGuid: row.tenantGuid,
201 // isCompany: true
202 // }
203 // getAssetDetail(params).then((res: any) => {
204 // if (res?.code === proxy.$passCode) {
205 // console.log(res.data, '--123-')
206
207 // }
208 // })
193 // 查资产 209 // 查资产
194 const getAssetsList = async () => { 210 const getAssetsList = async (values, row,) => {
195 const res = await getDamCatalogTable({ 211 console.log(values, row, '--查资产-')
196 pageSize: -1, 212 const params = {
197 pageIndex: 1, 213 daName: '',
198 }) 214 type: 1,
199 assetsOption.value = res.data.records || [] 215 companyGuid: values?.tenantGuid || row.companyGuid,
216 isCompany: true
217 }
218 const res = await getAssetDetail(params)
219 assetsOption.value = res.data || []
200 console.log(assetsOption.value, '---') 220 console.log(assetsOption.value, '---')
201 return Promise.resolve() 221 return Promise.resolve()
202 } 222 }
...@@ -236,7 +256,8 @@ const createOneData = () => { ...@@ -236,7 +256,8 @@ const createOneData = () => {
236 intableMoney: 0, 256 intableMoney: 0,
237 issuingEntityName: "", 257 issuingEntityName: "",
238 companyGuid: "", 258 companyGuid: "",
239 registerGuid: "" 259 registerGuid: "",
260 damGuid: ""
240 }) 261 })
241 //tableInfo.value.data = arr 262 //tableInfo.value.data = arr
242 tableInfo.value.currentId = BASE_ID 263 tableInfo.value.currentId = BASE_ID
...@@ -302,7 +323,7 @@ const columnSave = async (row) => { ...@@ -302,7 +323,7 @@ const columnSave = async (row) => {
302 ElMessage.success(`${tableInfo.value.flag === 'create' ? '新增' : '修改'}成功`); 323 ElMessage.success(`${tableInfo.value.flag === 'create' ? '新增' : '修改'}成功`);
303 getTableData() 324 getTableData()
304 columnInfoReset() 325 columnInfoReset()
305 documentList() 326 // documentList()
306 findTab(false) 327 findTab(false)
307 tableRef.value.columnInfo = {} 328 tableRef.value.columnInfo = {}
308 } else { 329 } else {
...@@ -326,7 +347,8 @@ const columnInfoReset = () => { ...@@ -326,7 +347,8 @@ const columnInfoReset = () => {
326 issuingEntityName: "", 347 issuingEntityName: "",
327 issuingEntityGuid: "", 348 issuingEntityGuid: "",
328 companyGuid: "", 349 companyGuid: "",
329 registerGuid: "" 350 registerGuid: "",
351 damGuid: ""
330 } 352 }
331 } 353 }
332 const columnEdit = (row) => { 354 const columnEdit = (row) => {
...@@ -376,12 +398,24 @@ const handelSelect = (row, key, row1) => { ...@@ -376,12 +398,24 @@ const handelSelect = (row, key, row1) => {
376 tableRef.value.columnInfo.effectiveDate = "" 398 tableRef.value.columnInfo.effectiveDate = ""
377 } else { 399 } else {
378 if (tableInfo.value.flag === "create") { 400 if (tableInfo.value.flag === "create") {
379 console.log(row, '-----') 401 console.log(row, '--create---')
402 // const params = {
403 // daName: row.damName,
404 // type: 1,
405 // companyGuid: row.tenantGuid,
406 // isCompany: true
407 // }
408 // getAssetDetail(params).then((res: any) => {
409 // if (res?.code === proxy.$passCode) {
410 // console.log(res.data, '--123-')
411
412 // }
413 // })
380 const currentDate = dayjs().format('YYYY-MM-DD'); 414 const currentDate = dayjs().format('YYYY-MM-DD');
381 columnInfo.value = { 415 columnInfo.value = {
382 guid: row.guid, 416 guid: row.guid,
383 companyName: row.rightMainName, 417 companyName: row.tenantName,
384 daName: row.damName, 418 daName: row.daName,
385 registerTime: row.registerTime, 419 registerTime: row.registerTime,
386 daCode: row.daCode, 420 daCode: row.daCode,
387 effectiveDate: row.effectiveDate, 421 effectiveDate: row.effectiveDate,
...@@ -390,7 +424,8 @@ const handelSelect = (row, key, row1) => { ...@@ -390,7 +424,8 @@ const handelSelect = (row, key, row1) => {
390 issuingEntityName: row.issuingEntityName, 424 issuingEntityName: row.issuingEntityName,
391 issuingEntityGuid: row.issuingEntityGuid, 425 issuingEntityGuid: row.issuingEntityGuid,
392 companyGuid: row.tenantGuid, 426 companyGuid: row.tenantGuid,
393 registerGuid: row.registerGuid 427 registerGuid: row.registerGuid,
428 damGuid: row.damGuid
394 } 429 }
395 const { guid, ...obj } = columnInfo.value 430 const { guid, ...obj } = columnInfo.value
396 tableRef.value.columnInfo = obj 431 tableRef.value.columnInfo = obj
...@@ -401,6 +436,7 @@ const handelSelect = (row, key, row1) => { ...@@ -401,6 +436,7 @@ const handelSelect = (row, key, row1) => {
401 columnInfo.value.effectiveDate = row.effectiveDate 436 columnInfo.value.effectiveDate = row.effectiveDate
402 columnInfo.value.issuingEntityName = row.issuingEntityName 437 columnInfo.value.issuingEntityName = row.issuingEntityName
403 columnInfo.value.registerGuid = row.registerGuid; 438 columnInfo.value.registerGuid = row.registerGuid;
439 columnInfo.value.damGuid = row.damGuid;
404 tableRef.value.columnInfo = { ...columnInfo.value } 440 tableRef.value.columnInfo = { ...columnInfo.value }
405 } 441 }
406 442
...@@ -415,7 +451,8 @@ const findTab = (flag) => { ...@@ -415,7 +451,8 @@ const findTab = (flag) => {
415 tab.meta.editPage = flag 451 tab.meta.editPage = flag
416 } 452 }
417 const addAssetsOption = (values, row, flag = false) => { 453 const addAssetsOption = (values, row, flag = false) => {
418 getAssetsList().then(() => { 454 console.log(values, row, flag, '--新增-')
455 getAssetsList(values, row).then(() => {
419 const obj = { 456 const obj = {
420 costAccessmentGuid: null, 457 costAccessmentGuid: null,
421 daCode: row.daCode, 458 daCode: row.daCode,
...@@ -432,6 +469,7 @@ const addAssetsOption = (values, row, flag = false) => { ...@@ -432,6 +469,7 @@ const addAssetsOption = (values, row, flag = false) => {
432 state: row.state, 469 state: row.state,
433 tenantGuid: row.companyGuid, 470 tenantGuid: row.companyGuid,
434 tenantName: row.companyName, 471 tenantName: row.companyName,
472 damGuid: row.damGuid
435 } 473 }
436 const arr = assetsOption.value 474 const arr = assetsOption.value
437 if (values && values.tenantGuid === row.companyGuid) { 475 if (values && values.tenantGuid === row.companyGuid) {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!