add
This commit is contained in:
parent
dab80090ea
commit
c84d07027e
5
d111
Normal file
5
d111
Normal file
@ -0,0 +1,5 @@
|
||||
* [32mmain[m
|
||||
[31mremotes/origin/HEAD[m -> origin/main
|
||||
[31mremotes/origin/dev[m
|
||||
[31mremotes/origin/main[m
|
||||
[31mremotes/origin/zhangwei[m
|
@ -64,7 +64,7 @@
|
||||
<el-table-column label="操作" width="150" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['contract.contract_negotiation/delete']" type="primary" link
|
||||
@click="handleDetail(row.id)">
|
||||
@click="handleDetail(row)">
|
||||
详情
|
||||
</el-button>
|
||||
<el-button v-perms="['contract.contract_negotiation/detail']" link @click="handleDown(row.id)">
|
||||
@ -78,9 +78,7 @@
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<detailPage v-if="showDetail" ref="detailRef" @close="showDetail = false" :detailConfig="detailConfig" />
|
||||
|
||||
<!-- <edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" /> -->
|
||||
<detailPage v-if="showDetail" ref="detailRef" @close="showDetail = false" :detailConfig="targetDetail" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -89,9 +87,19 @@ import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiContractLedgerLists, apiMarketingContract, apiMarketingContractdownload } from '@/api/contract_ledger'
|
||||
import feedback from '@/utils/feedback'
|
||||
import detailConfig from './detail'
|
||||
import detailConfig from './detail.js'
|
||||
import supervision_project from "@/views/supervision_project/detail.js"
|
||||
import manage_project from "@/views/manage_project/detail.js"
|
||||
import consult_project from "@/views/consult_project/detail.js"
|
||||
import cost_project from "@/views/cost_projects/detail.js"
|
||||
import {
|
||||
apiSupervisionProjectDetail
|
||||
} from '@/api/supervision_project'
|
||||
import { apiManageProjectDetail } from '@/api/manage_project'
|
||||
import { apiConsultProjectDetail } from '@/api/consult_project'
|
||||
import { apiCostProjectDetail } from '@/api/cost_project'
|
||||
|
||||
// import EditPopup from './edit.vue'
|
||||
const targetDetail = ref({})
|
||||
|
||||
const detailRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
// // 是否显示编辑框
|
||||
@ -120,15 +128,44 @@ const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
})
|
||||
|
||||
|
||||
// 详情
|
||||
const handleDetail = async (id: any) => {
|
||||
let res = await apiMarketingContract({ id })
|
||||
const open = async (obj, api, id) => {
|
||||
targetDetail.value = obj
|
||||
let res = await api({ id })
|
||||
showDetail.value = true
|
||||
await nextTick()
|
||||
detailRef.value?.open()
|
||||
detailRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
// 详情
|
||||
const handleDetail = async (row: any) => {
|
||||
|
||||
if (!row.project_id) {
|
||||
return feedback.msgError("暂无项目信息")
|
||||
}
|
||||
if (row.business_nature == 1) {
|
||||
open(supervision_project, apiSupervisionProjectDetail, row.project_id)
|
||||
|
||||
}
|
||||
else if (row.business_nature == 2) {
|
||||
open(manage_project, apiManageProjectDetail, row.project_id)
|
||||
|
||||
}
|
||||
else if (row.business_nature == 3) {
|
||||
open(consult_project, apiConsultProjectDetail, row.project_id)
|
||||
|
||||
}
|
||||
else if (row.business_nature == 4) {
|
||||
open(cost_project, apiCostProjectDetail, row.project_id)
|
||||
}
|
||||
else {
|
||||
feedback.msgError("暂无项目信息")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 下载
|
||||
const handleDown = async (id: number | any[]) => {
|
||||
let res = await apiMarketingContractdownload({ id })
|
||||
@ -136,7 +173,7 @@ const handleDown = async (id: number | any[]) => {
|
||||
a.href = res.url
|
||||
a.click()
|
||||
}
|
||||
|
||||
// console.log(supervision_project, '1212')
|
||||
getLists()
|
||||
</script>
|
||||
|
||||
|
@ -80,7 +80,8 @@ const detailConfig = {
|
||||
},
|
||||
{
|
||||
label: "负责人",
|
||||
value: "fzr_name"
|
||||
value: "fzr_name",
|
||||
|
||||
},
|
||||
{
|
||||
label: "负责人手机",
|
||||
@ -100,8 +101,6 @@ const detailConfig = {
|
||||
value: "annex",
|
||||
column: 1
|
||||
},
|
||||
|
||||
|
||||
],
|
||||
|
||||
|
||||
|
@ -1,8 +1,7 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
|
||||
@close="handleClose">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
|
||||
|
||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||
@ -82,13 +81,6 @@ const props = {
|
||||
async lazyLoad(node: any, resolve: any) {
|
||||
if (node.level == 0) {
|
||||
apimaterialLists({ page_no: 1, page_size: 9999 }).then((res) => {
|
||||
|
||||
// res.lists.unshift({
|
||||
// "id": -1,
|
||||
// "pid": 0,
|
||||
// "name": "顶级分类"
|
||||
// })
|
||||
|
||||
let nodes = res.lists.map((item: any) => ({
|
||||
value: item.id,
|
||||
label: item.name
|
||||
@ -97,7 +89,6 @@ const props = {
|
||||
resolve(nodes)
|
||||
})
|
||||
}
|
||||
|
||||
else {
|
||||
apimaterialDatas({ 'pid': node.value })
|
||||
.then((res) => {
|
||||
@ -115,8 +106,6 @@ const props = {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// 表单验证
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user