3b3f7a83 by xukangle

fix

1 parent ce9f82c7
......@@ -12,7 +12,6 @@ export const getEntryList = (params) => request({
export const deleteEntryAll = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/da-intable/delete?guid=${params}`,
method: 'delete',
data: params
})
/** 获取资产入表信息新增 */
export const createEntry = (params) => request({
......@@ -34,6 +33,12 @@ export const getDocumentList = (params) => request({
method: 'post',
data: params
})
/**资产详情 */
export const getAssetDetail = (data) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/intable/get-table-select`,
method: 'post',
data
})
/** 资产融资管理 */
/** 获取资产融资信息列表 */
......
......@@ -11,9 +11,11 @@ import {
deleteEntryAll,
createEntry,
intableUpdate,
getDocumentList
getDocumentList,
getAssetDetail
} from "@/api/modules/dataTransaction";
import { getDamCatalogTable } from '@/api/modules/dataAsset';
import { da } from 'element-plus/es/locale';
const route = useRoute()
const userStore = useUserStore();
const searchItemList = ref([
......@@ -68,7 +70,8 @@ const columnInfo = ref({
issuingEntityName: "",
issuingEntityGuid: "",
companyGuid: "",
registerGuid: ""
registerGuid: "",
damGuid: ""
})
const companyOption = ref<any>([
{
......@@ -95,6 +98,16 @@ const colums = [
selectOption: () => companyOption.value
},
{
prop: "daName",
label: "资产名称",
width: "180",
componentType: "select",
componentDisabled: false,
//editDisabled:()=> tableInfo.value.flag==="edit" ? true :false,
selectOption: () => assetsOption.value,
selectKey: "daName",
},
{
prop: "intableTime",
label: "入表时间",
width: "130",
......@@ -134,16 +147,7 @@ const colums = [
}
},
{
prop: "daName",
label: "资产名称",
width: "180",
componentType: "select",
componentDisabled: false,
//editDisabled:()=> tableInfo.value.flag==="edit" ? true :false,
selectOption: () => assetsOption.value,
selectKey: "damName",
},
{
prop: "daCode",
label: "资产编号",
......@@ -190,13 +194,29 @@ const documentList = async () => {
return Promise.resolve()
}
// const params = {
// daName: row.damName,
// type: 1,
// companyGuid: row.tenantGuid,
// isCompany: true
// }
// getAssetDetail(params).then((res: any) => {
// if (res?.code === proxy.$passCode) {
// console.log(res.data, '--123-')
// }
// })
// 查资产
const getAssetsList = async () => {
const res = await getDamCatalogTable({
pageSize: -1,
pageIndex: 1,
})
assetsOption.value = res.data.records || []
const getAssetsList = async (values, row,) => {
console.log(values, row, '--查资产-')
const params = {
daName: '',
type: 1,
companyGuid: values?.tenantGuid || row.companyGuid,
isCompany: true
}
const res = await getAssetDetail(params)
assetsOption.value = res.data || []
console.log(assetsOption.value, '---')
return Promise.resolve()
}
......@@ -236,7 +256,8 @@ const createOneData = () => {
intableMoney: 0,
issuingEntityName: "",
companyGuid: "",
registerGuid: ""
registerGuid: "",
damGuid: ""
})
//tableInfo.value.data = arr
tableInfo.value.currentId = BASE_ID
......@@ -302,7 +323,7 @@ const columnSave = async (row) => {
ElMessage.success(`${tableInfo.value.flag === 'create' ? '新增' : '修改'}成功`);
getTableData()
columnInfoReset()
documentList()
// documentList()
findTab(false)
tableRef.value.columnInfo = {}
} else {
......@@ -326,7 +347,8 @@ const columnInfoReset = () => {
issuingEntityName: "",
issuingEntityGuid: "",
companyGuid: "",
registerGuid: ""
registerGuid: "",
damGuid: ""
}
}
const columnEdit = (row) => {
......@@ -376,12 +398,24 @@ const handelSelect = (row, key, row1) => {
tableRef.value.columnInfo.effectiveDate = ""
} else {
if (tableInfo.value.flag === "create") {
console.log(row, '-----')
console.log(row, '--create---')
// const params = {
// daName: row.damName,
// type: 1,
// companyGuid: row.tenantGuid,
// isCompany: true
// }
// getAssetDetail(params).then((res: any) => {
// if (res?.code === proxy.$passCode) {
// console.log(res.data, '--123-')
// }
// })
const currentDate = dayjs().format('YYYY-MM-DD');
columnInfo.value = {
guid: row.guid,
companyName: row.rightMainName,
daName: row.damName,
companyName: row.tenantName,
daName: row.daName,
registerTime: row.registerTime,
daCode: row.daCode,
effectiveDate: row.effectiveDate,
......@@ -390,7 +424,8 @@ const handelSelect = (row, key, row1) => {
issuingEntityName: row.issuingEntityName,
issuingEntityGuid: row.issuingEntityGuid,
companyGuid: row.tenantGuid,
registerGuid: row.registerGuid
registerGuid: row.registerGuid,
damGuid: row.damGuid
}
const { guid, ...obj } = columnInfo.value
tableRef.value.columnInfo = obj
......@@ -401,6 +436,7 @@ const handelSelect = (row, key, row1) => {
columnInfo.value.effectiveDate = row.effectiveDate
columnInfo.value.issuingEntityName = row.issuingEntityName
columnInfo.value.registerGuid = row.registerGuid;
columnInfo.value.damGuid = row.damGuid;
tableRef.value.columnInfo = { ...columnInfo.value }
}
......@@ -415,7 +451,8 @@ const findTab = (flag) => {
tab.meta.editPage = flag
}
const addAssetsOption = (values, row, flag = false) => {
getAssetsList().then(() => {
console.log(values, row, flag, '--新增-')
getAssetsList(values, row).then(() => {
const obj = {
costAccessmentGuid: null,
daCode: row.daCode,
......@@ -432,6 +469,7 @@ const addAssetsOption = (values, row, flag = false) => {
state: row.state,
tenantGuid: row.companyGuid,
tenantName: row.companyName,
damGuid: row.damGuid
}
const arr = assetsOption.value
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!