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">
|
<el-table-column label="操作" width="150" fixed="right">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button v-perms="['contract.contract_negotiation/delete']" type="primary" link
|
<el-button v-perms="['contract.contract_negotiation/delete']" type="primary" link
|
||||||
@click="handleDetail(row.id)">
|
@click="handleDetail(row)">
|
||||||
详情
|
详情
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-perms="['contract.contract_negotiation/detail']" link @click="handleDown(row.id)">
|
<el-button v-perms="['contract.contract_negotiation/detail']" link @click="handleDown(row.id)">
|
||||||
@ -78,9 +78,7 @@
|
|||||||
<pagination v-model="pager" @change="getLists" />
|
<pagination v-model="pager" @change="getLists" />
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<detailPage v-if="showDetail" ref="detailRef" @close="showDetail = false" :detailConfig="detailConfig" />
|
<detailPage v-if="showDetail" ref="detailRef" @close="showDetail = false" :detailConfig="targetDetail" />
|
||||||
|
|
||||||
<!-- <edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" /> -->
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -89,9 +87,19 @@ import { usePaging } from '@/hooks/usePaging'
|
|||||||
import { useDictData } from '@/hooks/useDictOptions'
|
import { useDictData } from '@/hooks/useDictOptions'
|
||||||
import { apiContractLedgerLists, apiMarketingContract, apiMarketingContractdownload } from '@/api/contract_ledger'
|
import { apiContractLedgerLists, apiMarketingContract, apiMarketingContractdownload } from '@/api/contract_ledger'
|
||||||
import feedback from '@/utils/feedback'
|
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>>()
|
const detailRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||||
// // 是否显示编辑框
|
// // 是否显示编辑框
|
||||||
@ -120,15 +128,44 @@ const { pager, getLists, resetParams, resetPage } = usePaging({
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
// 详情
|
const open = async (obj, api, id) => {
|
||||||
const handleDetail = async (id: any) => {
|
targetDetail.value = obj
|
||||||
let res = await apiMarketingContract({ id })
|
let res = await api({ id })
|
||||||
showDetail.value = true
|
showDetail.value = true
|
||||||
await nextTick()
|
await nextTick()
|
||||||
detailRef.value?.open()
|
detailRef.value?.open()
|
||||||
detailRef.value?.setFormData(res)
|
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[]) => {
|
const handleDown = async (id: number | any[]) => {
|
||||||
let res = await apiMarketingContractdownload({ id })
|
let res = await apiMarketingContractdownload({ id })
|
||||||
@ -136,7 +173,7 @@ const handleDown = async (id: number | any[]) => {
|
|||||||
a.href = res.url
|
a.href = res.url
|
||||||
a.click()
|
a.click()
|
||||||
}
|
}
|
||||||
|
// console.log(supervision_project, '1212')
|
||||||
getLists()
|
getLists()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -80,7 +80,8 @@ const detailConfig = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "负责人",
|
label: "负责人",
|
||||||
value: "fzr_name"
|
value: "fzr_name",
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "负责人手机",
|
label: "负责人手机",
|
||||||
@ -100,8 +101,6 @@ const detailConfig = {
|
|||||||
value: "annex",
|
value: "annex",
|
||||||
column: 1
|
column: 1
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
|
|
||||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||||
@close="handleClose">
|
|
||||||
|
|
||||||
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||||
@ -82,13 +81,6 @@ const props = {
|
|||||||
async lazyLoad(node: any, resolve: any) {
|
async lazyLoad(node: any, resolve: any) {
|
||||||
if (node.level == 0) {
|
if (node.level == 0) {
|
||||||
apimaterialLists({ page_no: 1, page_size: 9999 }).then((res) => {
|
apimaterialLists({ page_no: 1, page_size: 9999 }).then((res) => {
|
||||||
|
|
||||||
// res.lists.unshift({
|
|
||||||
// "id": -1,
|
|
||||||
// "pid": 0,
|
|
||||||
// "name": "顶级分类"
|
|
||||||
// })
|
|
||||||
|
|
||||||
let nodes = res.lists.map((item: any) => ({
|
let nodes = res.lists.map((item: any) => ({
|
||||||
value: item.id,
|
value: item.id,
|
||||||
label: item.name
|
label: item.name
|
||||||
@ -97,7 +89,6 @@ const props = {
|
|||||||
resolve(nodes)
|
resolve(nodes)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
apimaterialDatas({ 'pid': node.value })
|
apimaterialDatas({ 'pid': node.value })
|
||||||
.then((res) => {
|
.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