This commit is contained in:
zmj 2024-02-05 15:45:58 +08:00
parent 14a41a40cb
commit 49d5c9ab6f
50 changed files with 1245 additions and 325 deletions

2
.gitignore vendored
View File

@ -29,5 +29,5 @@ components.d.ts
*.njsproj
*.sln
*.sw?
.zip
.env.development

BIN
dist.zip

Binary file not shown.

View File

@ -96,37 +96,20 @@ const formData = reactive({
},
"step": [
{
"flow_step": 0,
"flow_step": '',
"flow_user": "",
"is_active": 0,
"is_active": '',
"flow_step_text": ""
},
{
"flow_step": 2,
"flow_user": "测试添加管理,测试",
"is_active": 1,
"flow_step_text": "指定用户(任意一人)"
},
{
"flow_step": 2,
"flow_user": "测试添加管理,测试",
"is_active": 0,
"flow_step_text": "指定用户(任意一人)"
},
{
"flow_step": 3,
"flow_user": "究极张伟,赵明军",
"is_active": 0,
"flow_step_text": "指定用户(多人会签)"
}
],
"record": [
{
"title": "admin提交了此申请",
"content": "提交申请",
"check_time": "2024-02-03",
"title": "",
"content": "",
"check_time": "",
"status": 0,
"status_text": "发起申请"
"status_text": ""
}
]
})
@ -143,21 +126,11 @@ const setFormData = async (data: Record<any, any>) => {
}
//
const handleSubmit = async () => {
popupRef.value?.close()
emit('success')
}
//
const open = () => {
popupRef.value?.open()
}
//
const handleClose = () => {
emit('close')
}
//
const revokeFn = () => {
@ -168,7 +141,7 @@ const revokeFn = () => {
}
//
const checkFn = (i) => {
const checkFn = (i: Number) => {
flowapproveCheck({
id: props.approve_id,
check_status: i,
@ -176,13 +149,13 @@ const checkFn = (i) => {
})
}
const getStep = (item, index) => {
const getStep = (item: Object, index: Number) => {
if (index == 0) { return formData.create_user_name + '创建' }
else { return item.flow_step_text }
else { return item?.flow_step_text }
}
flowapproveDetail({ id: props.approve_id }).then(res => {
activeStep.value = res.step.findIndex(item => item.is_active == 1)
activeStep.value = res.step.findIndex((item: Object) => item?.is_active == 1)
setFormData(res)
})

View File

@ -1,7 +1,6 @@
<template>
<div class="edit-popup">
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
<!-- <flowProcess></flowProcess> -->
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
<el-card>
<template #header>
@ -209,10 +208,7 @@
</el-col>
</el-row>
</el-card>
<flowProcess @confirm="flowFn" v-if="mode == 'add'"></flowProcess>
<!-- const flowFn = (e: any) => {
formData.approve_detail = e
} -->
<el-dialog v-model="showDialog" title="选择客户" width="70%">
<customDialog @customEvent="customEvent"></customDialog>
@ -359,9 +355,6 @@ const formData = reactive({
approve_detail: {}
})
const flowFn = (e: any) => {
formData.approve_detail = e
}
//
const formRules = reactive<any>({

View File

@ -232,11 +232,6 @@
</template>
</el-table-column>
</el-table>
<flowProcess @confirm="flowFn" v-if="mode == 'add'"></flowProcess>
<!-- const flowFn = (e: any) => {
formData.approve_detail = e
} -->
</div>
</el-form>
<el-dialog v-model="showDialog" title="选择标书" width="70%">
@ -396,15 +391,8 @@ const formData = reactive({
business_contract_deviation_handling_plan: '',
business_contract_deviation_annex: [],
quotation_detail: [],
approve_detail: {
flow_type: "",
flow_path: ""
}
})
const flowFn = (e: any) => {
formData.approve_detail = e
}
watch(tableData.value, (newVal, oldVal) => {
formData.business_review_total_amount = 0
tableData.value.forEach(item => {

View File

@ -121,10 +121,7 @@
</el-form-item>
</el-col>
</el-row>
<flowProcess @confirm="flowFn" v-if="mode == 'add'"></flowProcess>
<!-- const flowFn = (e: any) => {
formData.approve_detail = e
} -->
<el-dialog v-model="showDialog" title="选择投标决策" width="70%">
<biddingDecisionDialog @customEvent="customEvent" :project_id="project?.id || ''">
</biddingDecisionDialog>
@ -238,9 +235,7 @@ const formData = reactive({
"account": "",
approve_detail: {}
})
const flowFn = (e: any) => {
formData.approve_detail = e
}
//
const formRules = reactive<any>({

View File

@ -144,10 +144,7 @@
</div>
</el-form-item></el-col>
</el-row>
<flowProcess @confirm="flowFn" v-if="mode == 'add'"></flowProcess>
<!-- const flowFn = (e: any) => {
formData.approve_detail = e
} -->
</el-form>
<el-dialog v-model="showDialog" title="选择合同" width="70%">
<proontractTable @customEvent="customEvent" :project_id="project?.id || ''"></proontractTable>
@ -255,9 +252,6 @@ const formData = reactive({
negotiation_quotation: [],
negotiation_basis: [],
})
const flowFn = (e: any) => {
formData.approve_detail = e
}
if (props.project) {
console.log(props.project)

View File

@ -84,8 +84,6 @@ import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
import EditPopup from './edit.vue'
import DetailPopup from './detail.vue'
import { useRoute } from "vue-router";
const route = useRoute()
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
const editRef = shallowRef<InstanceType<typeof EditPopup>>()

View File

@ -199,12 +199,6 @@
</el-col>
</el-row>
<flowProcess @confirm="flowFn" v-if="mode == 'add'"></flowProcess>
<!-- const flowFn = (e: any) => {
formData.approve_detail = e
} -->
<el-dialog v-model="showDialog" title="选择供应商" width="70%">
<suppliertable @customEvent="customEvent" :project_id="project?.id || ''"></suppliertable>
</el-dialog>
@ -404,11 +398,8 @@ const formData = reactive({
"account_name": "",
"account": ""
},
approve_detail: {}
})
const flowFn = (e: any) => {
formData.approve_detail = e
}
//
const formRules = reactive<any>({

View File

@ -94,19 +94,17 @@
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { paymentapplyLists, paymentapplyDelete, paymentapplyDetail } from '@/api/paymentrequest'
import { apiProcurementContractLists } from '@/api/procurement_contract'
import feedback from '@/utils/feedback'
import EditPopup from './edit.vue'
import DetailPopup from './detail.vue'
import { useRoute } from "vue-router";
const route = useRoute()
const list = ref([])
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
const list = ref([])
//
const showEdit = ref(false)
const showDtail = ref(false)

View File

@ -116,11 +116,6 @@
</el-form-item>
</el-col>
</el-row>
<flowProcess @confirm="flowFn" v-if="mode == 'add'"></flowProcess>
<!-- const flowFn = (e: any) => {
formData.approve_detail = e
} -->
<el-dialog v-model="showDialog" title="选择供应商" width="70%">
<supplier @customEvent="customEvent" :project_id="project?.id || ''"></supplier>
</el-dialog>
@ -263,9 +258,7 @@ const formData = reactive({
contract_cate: 1,
approve_detail: {}
})
const flowFn = (e: any) => {
formData.approve_detail = e
}
//
const formRules = reactive<any>({

View File

@ -152,11 +152,6 @@
</el-form-item>
</el-col>
</el-row>
<flowProcess @confirm="flowFn" v-if="mode == 'add'"></flowProcess>
<!-- const flowFn = (e: any) => {
formData.approve_detail = e
} -->
<el-dialog v-model="showDialog" title="选择供应商" width="70%">
<suppliertable @customEvent="customEvent" :project_id="project?.id || ''"></suppliertable>
</el-dialog>
@ -318,9 +313,6 @@ const formData = reactive({
contract_cate: 1,
approve_detail: {}
})
const flowFn = (e: any) => {
formData.approve_detail = e
}
//
const formRules = reactive<any>({

View File

@ -142,10 +142,6 @@
</el-form-item>
</el-col>
</el-row>
<flowProcess @confirm="flowFn" v-if="mode == 'add'"></flowProcess>
<!-- const flowFn = (e: any) => {
formData.approve_detail = e
} -->
<el-dialog v-model="showDialog" title="选择供应商" width="70%">
<suppliertable @customEvent="customEvent" :project_id="project?.id || ''"></suppliertable>
</el-dialog>
@ -319,13 +315,7 @@ const formData = reactive({
"account_name": "",
"account": ""
},
approve_detail: {}
})
const flowFn = (e: any) => {
formData.approve_detail = e
}
//
const formRules = reactive<any>({

View File

@ -141,10 +141,6 @@
</el-row>
<flowProcess @confirm="flowFn" v-if="mode == 'add'" />
<!-- const flowFn=(e: any)=> {
formData.approve_detail = e
} -->
<div v-if="showDialog">
<el-dialog v-model="showDialog" title="选择材料预算" width="70%">
<materialDialog @customEvent="customEvent" :project_id="formData.project_id"></materialDialog>
@ -299,11 +295,7 @@ const formData = reactive({
remark: '',
annex: [],
purchase_request_detail: [],
approve_detail: {}
})
const flowFn = (e: any) => {
formData.approve_detail = e
}
//
const formRules = reactive<any>({

View File

@ -0,0 +1,92 @@
<template>
<div class="detail-popup">
<popup ref="popupRef" :async="true" width="80%" @close="handleClose">
<el-card>
<el-descriptions :column="3" title="成本调整详情" border>
<el-descriptions-item :label="item.lable" label-align="left" align="left" label-class-name="my-label"
v-for="(item, index) in descriptionList" :key="index">
<span v-if="item.lable != '附件'"> {{ item.value.length > 1 ? formData[item.value[0]][item.value[1]] :
formData[item.value[0]]
}}</span>
<span v-else> <el-link class="m-2" v-for="item in formData.annex" :href="item.uri"
target="_blank">{{ item.name }}</el-link>
</span>
</el-descriptions-item>
</el-descriptions>
</el-card>
</popup>
</div>
</template>
<script lang="ts" setup name="customdetail">
import { ref, reactive } from "vue"
const descriptionList = reactive([
{
lable: "项目名称",
value: ['project_name']
},
{
lable: "项目编码",
value: ['project_code']
},
{
lable: "调整日期",
value: ['adjust_date']
},
{
lable: "调整金额",
value: ['adjust_amount']
},
{
lable: "附件",
value: ['annex']
},
{
lable: "备注",
value: ['remark']
},
])
const emit = defineEmits(['success', 'close'])
const popupRef = ref(null)
//
const formData: any = reactive({
})
//
const setFormData = async (data: Record<any, any>) => {
Object.assign(formData, data)
}
//
const open = () => {
popupRef.value?.open()
}
//
const handleClose = () => {
emit('close')
}
defineExpose({
open,
setFormData,
})
</script>
<style lang="scss" scoped>
.tit {
font-size: 1.2em;
margin-bottom: 10px;
}
:deep(.my-label) {
width: 150px;
}
</style>

View File

@ -35,12 +35,6 @@
</div>
</div>
</el-form-item>
<flowProcess @confirm="flowFn" v-if="mode == 'add'"></flowProcess>
<!-- const flowFn = (e: any) => {
formData.approve_detail = e
} -->
<flowDetail v-else :approve_id="formData?.approve_id" />
</el-form>
<el-dialog v-model="showDialog" title="选择项目" width="70%">
<projectDialog @customEvent="customEvent"></projectDialog>
@ -97,13 +91,14 @@ const formData = reactive({
"remark": "",
"annex": [],
project_name: "",
approve_detail: {},
// approve_detail: {
// flow_type: 1,
// flow_path: 1,
// path: "asa/ssa"
// },
approve_id: 0,
})
const flowFn = (e: any) => {
formData.approve_detail = e
}
const customEvent = (e: any) => {
console.log(e)
@ -115,7 +110,7 @@ const customEvent = (e: any) => {
const formRules = reactive<any>({
project_id: [{
required: true,
message: '请输入项目id',
message: '请选择项目',
trigger: ['blur']
}],
adjust_date: [{

View File

@ -47,6 +47,9 @@
@click="handleDelete(row.id)">
删除
</el-button>
<el-button v-perms="['project.project_cost_adjustment/detail']" link @click="handledetail(row)">
详情
</el-button>
</template>
</el-table-column>
</el-table>
@ -56,21 +59,25 @@
</div>
</el-card>
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
</div>
</template>
<script lang="ts" setup name="projectCostAdjustmentLists">
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiProjectCostAdjustmentLists, apiProjectCostAdjustmentDelete } from '@/api/project_cost_adjustment'
import { apiProjectCostAdjustmentLists, apiProjectCostAdjustmentDelete, apiProjectCostAdjustmentDetail } from '@/api/project_cost_adjustment'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
import EditPopup from './edit.vue'
import DetailPopup from './detail.vue'
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
//
const showEdit = ref(false)
const showDtail = ref(false)
//
const queryParams = reactive({
@ -115,6 +122,16 @@ const handleDelete = async (id: number | any[]) => {
await apiProjectCostAdjustmentDelete({ id })
getLists()
}
//
const handledetail = async (data: any) => {
let res = await apiProjectCostAdjustmentDetail({ id: data.id })
showDtail.value = true
await nextTick()
detailRef.value?.open()
detailRef.value?.setFormData(res)
}
import { useRoute } from "vue-router";
const route = useRoute()
if (route.query?.listId) {

View File

@ -0,0 +1,176 @@
<template>
<div class="detail-popup">
<popup ref="popupRef" title="人工预算详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
<el-descriptions :column="2" border>
<el-descriptions-item label="项目名称" label-align="left" align="left" label-class-name="my-label"> {{
formData.project_name }}</el-descriptions-item>
<el-descriptions-item label="项目编码" label-align="left" align="left" label-class-name="my-label"> {{
formData.project_code }}</el-descriptions-item>
<el-descriptions-item label="费用预算单号" label-align="left" align="left" label-class-name="my-label"> {{
formData.cost_budget_code }}</el-descriptions-item>
<el-descriptions-item label="备注" label-align="left" align="left" label-class-name="my-label"> {{
formData.remark
}}</el-descriptions-item>
<el-descriptions-item label="附件" label-align="left" align="left" label-class-name="my-label">
<div v-if="formData.annex && formData.annex.length > 0">
<div v-for="(item, index) in formData.annex" style="margin-left: 5px;display: block;">
<el-link style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri"
target="_blank">文件{{ index + 1 }}查看</el-link>
</div>
</div>
<div v-else>
暂无附件
</div>
</el-descriptions-item>
</el-descriptions>
<div>
<el-table :data="tableData" stripe style="width: 100%">
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
<el-table-column label="费用预算单号" prop="cost_budget_code" show-overflow-tooltip />
<el-table-column label="一级科目" prop="first_level_subject" show-overflow-tooltip />
<el-table-column label="二级科目" prop="second_level_subject" show-overflow-tooltip />
<el-table-column label="三级科目" prop="third_level_subject" show-overflow-tooltip />
<el-table-column label="是否差旅科目" prop="is_travel_text" show-overflow-tooltip />
<el-table-column label="单位" prop="unit" show-overflow-tooltip />
<el-table-column label="预算金额" prop="amount" show-overflow-tooltip />
<el-table-column label="编制标准" prop="standard" show-overflow-tooltip />
</el-table>
</div>
<div style="margin: 10px 0;">
<el-pagination v-model:current-page="pager1.page_no" v-model:page-size="pager1.page_size"
:page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total"
@size-change="handleSizeChange1" @current-change="handleCurrentChange1" />
</div>
</popup>
</div>
</template>
<script lang="ts" setup name="customdetail">
import { apiProjectCostBudgetDetailLists } from '@/api/project_cost_budget_detail.ts'
import type { FormInstance } from 'element-plus'
import Popup from '@/components/popup/index.vue'
import { apiCustomDetail } from '@/api/custom'
import type { PropType } from 'vue'
defineProps({
dictData: {
type: Object as PropType<Record<string, any[]>>,
default: () => ({})
}
})
const emit = defineEmits(['success', 'close'])
const formRef = shallowRef<FormInstance>()
const popupRef = shallowRef<InstanceType<typeof Popup>>()
const formDataannex = reactive([])
const pager1 = reactive({
page_size: 10,
page_no: 1,
customer_demand_id: ""
})
const total = ref(0)
const datas = reactive({
provinceOptions: [],
cityOptions: [],
areaOptions: [],
});
const tableData = ref([])
//
const formData = reactive({
})
//
const handleSizeChange1 = (val: number) => {
pager1.page_size = val
budgetDetailLists(formData.id)
}
//
const handleCurrentChange1 = (val: number) => {
console.log(`current page: ${val}`)
pager1.page_no = val
budgetDetailLists(formData.id)
}
//
const budgetDetailLists = (id) => {
apiProjectCostBudgetDetailLists({ 'page_no': pager1.page_no, 'page_size': pager1.page_size, cost_budget_id: id }).then((res) => {
tableData.value = res.lists
total.value = res.count
})
}
//
const setFormData = async (data: Record<any, any>) => {
Object.assign(formData, data)
budgetDetailLists(data.id)
if (data.annex && data.annex.length > 0) {
const arry1 = data.annex.map((item: any, index: any) => {
return {
name: `文件${index + 1}`,
uri: item
};
});
Object.assign(formDataannex, arry1)
}
}
const getDetail = async (row: Record<string, any>) => {
const data = await apiCustomDetail({
id: row.id
})
setFormData(data)
}
//
const handleSubmit = async () => {
popupRef.value?.close()
}
//
const open = () => {
console.log('1111111')
popupRef.value?.open()
}
//
const handleClose = () => {
emit('close')
}
defineExpose({
open,
setFormData,
getDetail
})
</script>
<style lang="scss" scoped>
.tit {
font-size: 1.2em;
margin-bottom: 10px;
}
:deep(.my-label) {
width: 150px;
}
</style>

View File

@ -90,11 +90,7 @@
</el-table>
</div>
</el-col>
<flowProcess @confirm="flowFn" v-if="mode == 'add'"></flowProcess>
<!-- const flowFn = (e: any) => {
formData.approve_detail = e
} -->
<flowDetail v-else :approve_id="formData?.approve_id" />
</el-form>
<el-dialog v-model="showDialog" title="选择项目" width="70%">
@ -167,9 +163,7 @@ const formData = reactive({
approve_detail: {},
approve_id: 0,
})
const flowFn = (e: any) => {
formData.approve_detail = e
}
const customEvent = (e: any) => {
formData.project_id = e.id
formData.project_code = e.project_code

View File

@ -50,6 +50,9 @@
@click="handleDelete(row.id)">
删除
</el-button>
<el-button v-perms="['project.project_cost_budget/detail']" link @click="handledetail(row)">
详情
</el-button>
</template>
</el-table-column>
</el-table>
@ -59,20 +62,23 @@
</div>
</el-card>
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
</div>
</template>
<script lang="ts" setup name="projectCostBudgetLists">
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiProjectCostBudgetLists, apiProjectCostBudgetDelete } from '@/api/project_cost_budget'
import { apiProjectCostBudgetLists, apiProjectCostBudgetDelete, apiProjectCostBudgetDetail } from '@/api/project_cost_budget'
import feedback from '@/utils/feedback'
import EditPopup from './edit.vue'
import DetailPopup from './detail.vue'
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
//
const showEdit = ref(false)
const showDtail = ref(false)
//
const queryParams = reactive({
@ -119,6 +125,15 @@ const handleDelete = async (id: number | any[]) => {
await apiProjectCostBudgetDelete({ id })
getLists()
}
//
const handledetail = async (data: any) => {
let res = await apiProjectCostBudgetDetail({ id: data.id })
showDtail.value = true
await nextTick()
detailRef.value?.open()
detailRef.value?.setFormData(res)
}
import { useRoute } from "vue-router";
const route = useRoute()
if (route.query?.listId) {

View File

@ -0,0 +1,177 @@
<template>
<div class="detail-popup">
<popup ref="popupRef" title="人工预算详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
<el-descriptions :column="2" border>
<el-descriptions-item label="项目名称" label-align="left" align="left" label-class-name="my-label"> {{
formData.project_name }}</el-descriptions-item>
<el-descriptions-item label="项目编码" label-align="left" align="left" label-class-name="my-label"> {{
formData.project_code }}</el-descriptions-item>
<el-descriptions-item label="机具预算单号" label-align="left" align="left" label-class-name="my-label"> {{
formData.equipment_budget_code }}</el-descriptions-item>
<el-descriptions-item label="备注" label-align="left" align="left" label-class-name="my-label"> {{
formData.remark
}}</el-descriptions-item>
<el-descriptions-item label="附件" label-align="left" align="left" label-class-name="my-label">
<div v-if="formData.annex && formData.annex.length > 0">
<div v-for="(item, index) in formData.annex" style="margin-left: 5px;display: block;">
<el-link style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri"
target="_blank">文件{{ index + 1 }}查看</el-link>
</div>
</div>
<div v-else>
暂无附件
</div>
</el-descriptions-item>
</el-descriptions>
<div>
<el-table :data="tableData" stripe style="width: 100%">
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
<el-table-column label="机具预算单号" prop="equipment_budget_code" show-overflow-tooltip />
<el-table-column label="机具类别" prop="type" show-overflow-tooltip />
<el-table-column label="机具名称" prop="name" show-overflow-tooltip />
<el-table-column label="规格型号" prop="spec" show-overflow-tooltip />
<el-table-column label="单位" prop="unit" show-overflow-tooltip />
<el-table-column label="数量" prop="num" show-overflow-tooltip />
<el-table-column label="单价" prop="price" show-overflow-tooltip />
<el-table-column label="金额" prop="amount" show-overflow-tooltip />
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
</el-table>
</div>
<div style="margin: 10px 0;">
<el-pagination v-model:current-page="pager1.page_no" v-model:page-size="pager1.page_size"
:page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total"
@size-change="handleSizeChange1" @current-change="handleCurrentChange1" />
</div>
</popup>
</div>
</template>
<script lang="ts" setup name="customdetail">
import { apiProjectEquipmentBudgetDetailLists } from '@/api/project_equipment_budget_detail'
import type { FormInstance } from 'element-plus'
import Popup from '@/components/popup/index.vue'
import { apiCustomDetail } from '@/api/custom'
import type { PropType } from 'vue'
defineProps({
dictData: {
type: Object as PropType<Record<string, any[]>>,
default: () => ({})
}
})
const emit = defineEmits(['success', 'close'])
const formRef = shallowRef<FormInstance>()
const popupRef = shallowRef<InstanceType<typeof Popup>>()
const formDataannex = reactive([])
const pager1 = reactive({
page_size: 10,
page_no: 1,
customer_demand_id: ""
})
const total = ref(0)
const datas = reactive({
provinceOptions: [],
cityOptions: [],
areaOptions: [],
});
const tableData = ref([])
//
const formData = reactive({
})
//
const handleSizeChange1 = (val: number) => {
pager1.page_size = val
budgetDetailLists(formData.id)
}
//
const handleCurrentChange1 = (val: number) => {
console.log(`current page: ${val}`)
pager1.page_no = val
budgetDetailLists(formData.id)
}
//
const budgetDetailLists = (id) => {
apiProjectEquipmentBudgetDetailLists({ 'page_no': pager1.page_no, 'page_size': pager1.page_size, equipment_budget_id: id }).then((res) => {
tableData.value = res.lists
total.value = res.count
})
}
//
const setFormData = async (data: Record<any, any>) => {
Object.assign(formData, data)
budgetDetailLists(data.id)
if (data.annex && data.annex.length > 0) {
const arry1 = data.annex.map((item: any, index: any) => {
return {
name: `文件${index + 1}`,
uri: item
};
});
Object.assign(formDataannex, arry1)
}
}
const getDetail = async (row: Record<string, any>) => {
const data = await apiCustomDetail({
id: row.id
})
setFormData(data)
}
//
const handleSubmit = async () => {
popupRef.value?.close()
}
//
const open = () => {
console.log('1111111')
popupRef.value?.open()
}
//
const handleClose = () => {
emit('close')
}
defineExpose({
open,
setFormData,
getDetail
})
</script>
<style lang="scss" scoped>
.tit {
font-size: 1.2em;
margin-bottom: 10px;
}
:deep(.my-label) {
width: 150px;
}
</style>

View File

@ -94,12 +94,6 @@
</el-table>
</div>
</el-col>
<flowProcess @confirm="flowFn" v-if="mode == 'add'"></flowProcess>
<flowDetail v-else :approve_id="formData?.approve_id" />
<!-- const flowFn = (e: any) => {
formData.approve_detail = e
} -->
</el-form>
<el-dialog v-model="showDialog" title="选择项目" width="70%">
<projectDialog @customEvent="customEvent"></projectDialog>
@ -177,9 +171,7 @@ const formData = reactive({
approve_detail: {},
approve_id: 0
})
const flowFn = (e: any) => {
formData.approve_detail = e
}
const customEvent = (e) => {
formData.project_id = e.id
formData.project_code = e.project_code

View File

@ -50,6 +50,10 @@
@click="handleDelete(row.id)">
删除
</el-button>
<el-button v-perms="['project.project_equipment_budget/detail']" link
@click="handledetail(row)">
详情
</el-button>
</template>
</el-table-column>
</el-table>
@ -59,21 +63,24 @@
</div>
</el-card>
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
</div>
</template>
<script lang="ts" setup name="projectEquipmentBudgetLists">
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiProjectEquipmentBudgetLists, apiProjectEquipmentBudgetDelete } from '@/api/project_equipment_budget'
import { timeFormat } from '@/utils/util'
import { apiProjectEquipmentBudgetLists, apiProjectEquipmentBudgetDelete, apiProjectEquipmentBudgetDetail } from '@/api/project_equipment_budget'
import feedback from '@/utils/feedback'
import EditPopup from './edit.vue'
import DetailPopup from './detail.vue'
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
//
const showEdit = ref(false)
const showDtail = ref(false)
//
const queryParams = reactive({
@ -119,10 +126,19 @@ const handleDelete = async (id: number | any[]) => {
await apiProjectEquipmentBudgetDelete({ id })
getLists()
}
//
const handledetail = async (data: any) => {
let res = await apiProjectEquipmentBudgetDetail({ id: data.id })
showDtail.value = true
await nextTick()
detailRef.value?.open()
detailRef.value?.setFormData(res)
}
import { useRoute } from "vue-router";
const route = useRoute()
if (route.query?.listId) {
handleEdit({ id: route.query.listId })
// handleEdit({ id: route.query.listId })
}
getLists()

View File

@ -0,0 +1,123 @@
<template>
<div class="detail-popup">
<popup ref="popupRef" :async="true" width="80%" @close="handleClose">
<el-card>
<el-descriptions :column="3" title="费用报销详情" border>
<el-descriptions-item :label="item.lable" label-align="left" align="left" label-class-name="my-label"
v-for="(item, index) in descriptionList" :key="index">
{{ item.value.length > 1 ? formData[item.value[0]][item.value[1]] : formData[item.value[0]] }}
</el-descriptions-item>
</el-descriptions>
</el-card>
</popup>
</div>
</template>
<script lang="ts" setup name="customdetail">
import { ref, reactive } from "vue"
const descriptionList = reactive([
{
lable: "项目名称",
value: ['project_name']
},
{
lable: "项目编码",
value: ['project_code']
},
{
lable: "借款单号",
value: ['loan_apply_code']
},
{
lable: "冲抵借款金额",
value: ['offset_loan_amount']
},
{
lable: "报销人",
value: ['apply_user']
},
{
lable: "报销类型",
value: ['reimbursement_type_text']
},
{
lable: "报销日期",
value: ['apply_date']
},
{
lable: "收款人姓名",
value: ['payee_name']
},
{
lable: "收款银行",
value: ['payee_bank']
},
{
lable: "收款账号",
value: ['payee_account']
},
{
lable: "账户编码",
value: ['bank_account', 'account_sn']
},
{
lable: "开户银行",
value: ['bank_account', 'deposit_bank']
},
{
lable: "开户名称",
value: ['bank_account', 'account_name']
},
{
lable: "开户账号",
value: ['bank_account', 'account']
},
{
lable: "备注",
value: ['remark']
},
])
const emit = defineEmits(['success', 'close'])
const popupRef = ref(null)
//
const formData: any = reactive({
})
//
const setFormData = async (data: Record<any, any>) => {
Object.assign(formData, data)
}
//
const open = () => {
popupRef.value?.open()
}
//
const handleClose = () => {
emit('close')
}
defineExpose({
open,
setFormData,
})
</script>
<style lang="scss" scoped>
.tit {
font-size: 1.2em;
margin-bottom: 10px;
}
:deep(.my-label) {
width: 150px;
}
</style>

View File

@ -187,10 +187,6 @@
</el-table>
</div>
</el-col>
<flowProcess @confirm="flowFn" v-if="mode == 'add'" />
<!-- const flowFn=(e: any)=> {
formData.approve_detail = e
} -->
</el-form>
<el-dialog v-model="showDialog" title="选择项目" width="70%">
@ -330,11 +326,13 @@ const formData = reactive({
"account_name": "",
"account": ""
},
approve_detail: {}
// approve_detail: {
// flow_type: 1,
// flow_path: 1,
// path: "asa/ssa"
// },
})
const flowFn = (e: any) => {
formData.approve_detail = e
}
//
const handleAvatarSuccess_four = (response: any) => {
// @ts-ignore

View File

@ -51,6 +51,10 @@
@click="handleDelete(row.id)">
删除
</el-button>
<el-button v-perms="['project.project_expense_reimbursement/detail']" link
@click="handledetail(row)">
详情
</el-button>
</template>
</el-table-column>
</el-table>
@ -60,6 +64,8 @@
</div>
</el-card>
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
</div>
</template>
@ -67,13 +73,16 @@
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiProjectExpenseReimbursementLists, apiProjectExpenseReimbursementDelete, apiProjectExpenseReimbursementDetail } from '@/api/project_expense_reimbursement'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
import EditPopup from './edit.vue'
import DetailPopup from './detail.vue'
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
//
const showEdit = ref(false)
const showDtail = ref(false)
//
@ -123,6 +132,15 @@ const handleDelete = async (id: number | any[]) => {
await apiProjectExpenseReimbursementDelete({ id })
getLists()
}
//
const handledetail = async (data: any) => {
let res = await apiProjectExpenseReimbursementDetail({ id: data.id })
showDtail.value = true
await nextTick()
detailRef.value?.open()
detailRef.value?.setFormData(res)
}
import { useRoute } from "vue-router";
const route = useRoute()
if (route.query?.listId) {

View File

@ -65,6 +65,7 @@ const formData = reactive({
first_level_subject: "",
amount: '',
remark: '',
})

View File

@ -47,11 +47,12 @@
</el-table-column>
</el-table>
</div>
<div class="flex mt-4 justify-end">
<div class="flex justify-end mt-4">
<pagination v-model="pager" @change="getLists" />
</div>
</el-card>
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
</div>
</template>
@ -59,13 +60,14 @@
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiProjectExpenseReimbursementDetailLists, apiProjectExpenseReimbursementDetailDelete, apiProjectExpenseReimbursementDetailDetail } from '@/api/project_expense_reimbursement_detail'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
import EditPopup from './edit.vue'
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
//
const showEdit = ref(false)
const showDtail = ref(false)
//

View File

@ -1,24 +1,23 @@
<template>
<div class="detail-popup">
<popup ref="popupRef" title="分包预算详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
<popup ref="popupRef" title="人工预算详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
<el-descriptions :column="2" border>
<el-descriptions-item label="项目名称" label-align="left" align="left" label-class-name="my-label"> {{
formData.project_name }}</el-descriptions-item>
<el-descriptions-item label="项目编码" label-align="left" align="left" label-class-name="my-label"> {{
formData.project_code }}</el-descriptions-item>
<el-descriptions-item label="分包预算单号" label-align="left" align="left" label-class-name="my-label"> {{
formData.subpackage_budget_code }}</el-descriptions-item>
<el-descriptions-item label="人工预算单号" label-align="left" align="left" label-class-name="my-label"> {{
formData.labor_budget_code }}</el-descriptions-item>
<el-descriptions-item label="备注" label-align="left" align="left" label-class-name="my-label"> {{
formData.remark
}}</el-descriptions-item>
<el-descriptions-item label="附件" label-align="left" align="left" label-class-name="my-label">
<div v-if="formData.annex && formData.annex.length > 0">
<div v-for="(item, index) in formData.annex" style="margin-left: 5px;display: block;">
<el-link style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item"
<el-link style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri"
target="_blank">文件{{ index + 1 }}查看</el-link>
</div>
</div>
@ -30,11 +29,10 @@
<div>
<el-table :data="tableData" stripe style="width: 100%">
<el-table-column label="序号" type="index" show-overflow-tooltip />
<el-table-column label="工作类型" prop="work_type" show-overflow-tooltip />
<el-table-column label="工作内容" prop="work_content" show-overflow-tooltip />
<el-table-column label="项目特征" prop="project_features" show-overflow-tooltip />
<el-table-column label="工种名称" prop="job_type_name" show-overflow-tooltip />
<el-table-column label="人工说明" prop="desc" show-overflow-tooltip />
<el-table-column label="单位" prop="unit" show-overflow-tooltip />
<el-table-column label="数量" prop="num" show-overflow-tooltip />
<el-table-column label="单价" prop="price" show-overflow-tooltip />
<el-table-column label="金额" prop="amount" show-overflow-tooltip />
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
@ -50,11 +48,11 @@
</template>
<script lang="ts" setup name="customdetail">
import { subpackagdetailLists } from '@/api/project_subpackage_budget_detail'
import { apiProjectLaborBudgetDetailLists } from '@/api/project_labor_budget_detail'
import type { FormInstance } from 'element-plus'
import Popup from '@/components/popup/index.vue'
import { apiCustomDetail } from '@/api/custom'
import { timeFormat } from '@/utils/util'
import type { PropType } from 'vue'
defineProps({
dictData: {
@ -100,7 +98,7 @@ const handleCurrentChange1 = (val: number) => {
//
const budgetDetailLists = (id) => {
subpackagdetailLists({ 'page_no': pager1.page_no, 'page_size': pager1.page_size, subpackage_budget_id: id }).then((res) => {
apiProjectLaborBudgetDetailLists({ 'page_no': pager1.page_no, 'page_size': pager1.page_size, labor_budget_id: id }).then((res) => {
tableData.value = res.lists
total.value = res.count
})
@ -173,4 +171,5 @@ defineExpose({
:deep(.my-label) {
width: 150px;
}</style>
}
</style>

View File

@ -90,10 +90,7 @@
</el-table>
</div>
</el-col>
<flowProcess @confirm="flowFn" v-if="mode == 'add'"></flowProcess>
<!-- const flowFn = (e: any) => {
formData.approve_detail = e
} -->
</el-form>
<el-dialog v-model="showDialog" title="选择项目" width="70%">
<projectDialog @customEvent="customEvent" :is_budget="1"></projectDialog>
@ -167,12 +164,8 @@ const formData = reactive({
}
],
approve_detail: {}
})
const flowFn = (e: any) => {
formData.approve_detail = e
}
const customEvent = (e) => {
formData.project_id = e.id

View File

@ -52,6 +52,9 @@
@click="handleDelete(row.id)">
删除
</el-button>
<el-button v-perms="['project.project_labor_budget/detail']" link @click="handledetail(row)">
详情
</el-button>
</template>
</el-table-column>
</el-table>
@ -61,6 +64,8 @@
</div>
</el-card>
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
</div>
</template>
@ -68,13 +73,15 @@
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiProjectLaborBudgetLists, apiProjectLaborBudgetDelete, apiProjectLaborBudgetDetail } from '@/api/project_labor_budget'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
import EditPopup from './edit.vue'
import DetailPopup from './detail.vue'
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
//
const showEdit = ref(false)
const showDtail = ref(false)
//
@ -122,10 +129,19 @@ const handleDelete = async (id: number | any[]) => {
await apiProjectLaborBudgetDelete({ id })
getLists()
}
//
const handledetail = async (data: any) => {
let res = await apiProjectLaborBudgetDetail({ id: data.id })
showDtail.value = true
await nextTick()
detailRef.value?.open()
detailRef.value?.setFormData(res)
}
import { useRoute } from "vue-router";
const route = useRoute()
if (route.query?.listId) {
handledetail({ id: route.query.listId })
// handledetail({ id: route.query.listId })
}
getLists()
</script>

View File

@ -0,0 +1,124 @@
<template>
<div class="detail-popup">
<popup ref="popupRef" :async="true" width="80%" @close="handleClose">
<el-card>
<el-descriptions :column="3" title="借款申请详情" border>
<el-descriptions-item :label="item.lable" label-align="left" align="left" label-class-name="my-label"
v-for="(item, index) in descriptionList" :key="index">
<span v-if="item.lable != '附件'"> {{ item.value.length > 1 ? formData[item.value[0]][item.value[1]] :
formData[item.value[0]]
}}</span>
<span v-else> <el-link class="m-2" v-for="item in formData.annex" :href="item.uri"
target="_blank">{{ item.name }}</el-link>
</span>
</el-descriptions-item>
</el-descriptions>
</el-card>
</popup>
</div>
</template>
<script lang="ts" setup name="customdetail">
import { ref, reactive } from "vue"
const descriptionList = reactive([
{
lable: "项目名称",
value: ['project_name']
},
{
lable: "项目编码",
value: ['project_code']
},
{
lable: "借款人",
value: ['apply_user']
},
{
lable: "借款申请日期",
value: ['loan_date']
},
{
lable: "借款金额",
value: ['loan_amount']
},
{
lable: "收款人姓名",
value: ['payee_name']
},
{
lable: "收款银行",
value: ['payee_bank']
},
{
lable: "收款账号",
value: ['payee_account']
},
{
lable: "账户编码",
value: ['bank_account', 'account_sn']
},
{
lable: "开户银行",
value: ['bank_account', 'deposit_bank']
},
{
lable: "开户名称",
value: ['bank_account', 'account_name']
},
{
lable: "开户账号",
value: ['bank_account', 'account']
},
{
lable: "附件",
value: ['annex']
},
{
lable: "备注",
value: ['remark']
},
])
const emit = defineEmits(['success', 'close'])
const popupRef = ref(null)
//
const formData: any = reactive({
})
//
const setFormData = async (data: Record<any, any>) => {
Object.assign(formData, data)
}
//
const open = () => {
popupRef.value?.open()
}
//
const handleClose = () => {
emit('close')
}
defineExpose({
open,
setFormData,
})
</script>
<style lang="scss" scoped>
.tit {
font-size: 1.2em;
margin-bottom: 10px;
}
:deep(.my-label) {
width: 150px;
}
</style>

View File

@ -70,10 +70,7 @@
</el-form-item>
<flowProcess @confirm="flowFn" v-if="mode == 'add'"></flowProcess>
<!-- const flowFn = (e: any) => {
formData.approve_detail = e
} -->
</el-form>
<el-dialog v-model="showDialog" title="选择项目" width="70%">
@ -139,12 +136,13 @@ const formData = reactive({
"account_name": "",
"account": ""
},
approve_detail: {}
// approve_detail: {
// flow_type: 1,
// flow_path: 1,
// path: "asa/ssa"
// }
})
const flowFn = (e: any) => {
formData.approve_detail = e
}
//
const handleAvatarSuccess_four = (response: any) => {
// @ts-ignore
@ -175,7 +173,7 @@ const formRules = reactive<any>({
}],
project_id: [{
required: true,
message: '请输入项目id',
message: '请选择项目',
trigger: ['blur']
}],
apply_user: [{

View File

@ -49,6 +49,9 @@
@click="handleDelete(row.id)">
删除
</el-button>
<el-button v-perms="['project_loan_apply/detail']" link @click="handledetail(row)">
详情
</el-button>
</template>
</el-table-column>
</el-table>
@ -58,6 +61,8 @@
</div>
</el-card>
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
</div>
</template>
@ -68,11 +73,13 @@ import { apiProjectLoanApplyLists, apiProjectLoanApplyDelete, apiProjectLoanAppl
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
import EditPopup from './edit.vue'
import DetailPopup from './detail.vue'
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
//
const showEdit = ref(false)
const showDtail = ref(false)
//
const queryParams = reactive({
@ -128,10 +135,22 @@ const handleDelete = async (id: number | any[]) => {
await apiProjectLoanApplyDelete({ id })
getLists()
}
//
const handledetail = async (data: any) => {
let res = await apiProjectLoanApplyDetail({ id: data.id })
showDtail.value = true
await nextTick()
detailRef.value?.open()
detailRef.value?.setFormData(res)
}
import { useRoute } from "vue-router";
const route = useRoute()
if (route.query?.listId) {
// handledetail({ id: route.query.listId })
handledetail({ id: route.query.listId })
}
getLists()
</script>

View File

@ -121,10 +121,7 @@
</el-col>
</el-row>
<flowProcess @confirm="flowFn" v-if="mode == 'add'"></flowProcess>
<!-- const flowFn = (e: any) => {
formData.approve_detail = e
} -->
</el-form>
<el-dialog v-model="showDialog" title="选择项目" width="70%">
<projectDialog @customEvent="customEvent"></projectDialog>
@ -179,9 +176,7 @@ const formData = reactive({
annex: [],
approve_detail: {}
})
const flowFn = (e: any) => {
formData.approve_detail = e
}
//
const customEvent = (e) => {

View File

@ -53,10 +53,7 @@
</div>
</div>
</el-form-item>
<flowProcess @confirm="flowFn" v-if="mode == 'add'"></flowProcess>
<!-- const flowFn = (e: any) => {
formData.approve_detail = e
} -->
</el-form>
</popup>
<el-dialog v-model="showDialog" title="选择项目" width="70%">
@ -189,9 +186,7 @@ const formData = reactive({
annex: [],
approve_detail: {}
})
const flowFn = (e: any) => {
formData.approve_detail = e
}
const checkPhone = (rule: any, value: any, callback: (arg0: Error) => any) => {
const phoneReg = /^1[3|4|5|7|8][0-9]{9}$/
// if (!value) {

View File

@ -43,10 +43,7 @@
</div>
</div>
</el-form-item>
<flowProcess @confirm="flowFn" v-if="mode == 'add'"></flowProcess>
<!-- const flowFn = (e: any) => {
formData.approve_detail = e
} -->
</el-form>
</popup>
<el-dialog v-model="showDialog" title="选择项目" width="70%">
@ -165,12 +162,14 @@ const formData = reactive({
settlement_date: '',
remark: '',
annex: [],
approve_detail: {}
approve_detail: {
flow_type: 1,
flow_path: 1,
path: "asa/ssa"
}
})
const flowFn = (e: any) => {
formData.approve_detail = e
}
//
const amountinput = (e) => {

View File

@ -105,10 +105,7 @@
</div>
</el-col>
</el-row>
<flowProcess @confirm="flowFn" v-if="mode == 'add'"></flowProcess>
<!-- const flowFn = (e: any) => {
formData.approve_detail = e
} -->
</el-form>
<el-dialog v-model="showDialog" title="选择项目" width="70%">
<projectDialog @customEvent="customEvent"></projectDialog>
@ -166,9 +163,7 @@ const formData = reactive({
annex: [],
approve_detail: {}
})
const flowFn = (e: any) => {
formData.approve_detail = e
}
//
const customEvent = (e) => {

View File

@ -136,13 +136,7 @@
</el-form-item>
</el-col>
</el-row>
<flowProcess @confirm="flowFn" v-if="mode == 'add'"></flowProcess>
<!-- const flowFn = (e: any) => {
formData.approve_detail = e
} -->
<!-- <el-dialog v-model="showDialog" title="选择客户" width="70%">
<customDialog @customEvent="customEvent"></customDialog>
</el-dialog> -->
<el-dialog v-model="showDialog1" title="选择合同" width="70%">
<salescontractDialog @customEvent="customEvent1"></salescontractDialog>
</el-dialog>
@ -446,9 +440,7 @@ const formData = reactive({
approve_detail: {}
})
const flowFn = (e: any) => {
formData.approve_detail = e
}
//
const formRules = reactive<any>({

View File

@ -0,0 +1,163 @@
<template>
<div class="detail-popup">
<popup ref="popupRef" :async="true" width="80%" @close="handleClose">
<el-card>
<el-descriptions :column="3" title="成本调整详情" border>
<el-descriptions-item :label="item.lable" label-align="left" align="left" label-class-name="my-label"
v-for="(item, index) in descriptionList" :key="index">
<span v-if="item.lable != '附件'"> {{ item.value.length > 1 ? formData[item.value[0]][item.value[1]] :
formData[item.value[0]]
}}</span>
<span v-else> <el-link class="m-2" v-for="item in formData.annex" :href="item.uri"
target="_blank">{{ item.name }}</el-link>
</span>
</el-descriptions-item>
</el-descriptions>
</el-card>
</popup>
</div>
</template>
<script lang="ts" setup name="customdetail">
import { ref, reactive } from "vue"
const descriptionList = reactive([
{
lable: "项目名称",
value: ['project_name']
},
{
lable: "项目编码",
value: ['project_code']
},
{
lable: "借款单号",
value: ['loan_apply_code']
},
{
lable: "冲抵借款金额",
value: ['offset_loan_amount']
},
{
lable: "报销人",
value: ['apply_user']
},
{
lable: "报销类型",
value: ['reimbursement_type_text']
},
{
lable: "报销日期",
value: ['apply_date']
},
{
lable: "收款人姓名",
value: ['payee_name']
},
{
lable: "收款银行",
value: ['payee_bank']
},
{
lable: "收款账号",
value: ['payee_account']
},
{
lable: "账户编码",
value: ['bank_account', 'account_sn']
},
{
lable: "开户银行",
value: ['bank_account', 'deposit_bank']
},
{
lable: "开户名称",
value: ['bank_account', 'account_name']
},
{
lable: "开户账号",
value: ['bank_account', 'account']
},
{
lable: "备注",
value: ['remark']
},
])
const emit = defineEmits(['success', 'close'])
const popupRef = ref(null)
//
const formData: any = reactive({
"id": 7,
"trip_apply_id": 9,
"project_id": 18,
"trip_reimbursement_code": "项目差旅报销-20240205-752579",
"reimbursement_type": "1",
"loan_apply_id": 8,
"offset_loan_amount": "12.00",
"apply_user": "121",
"apply_date": "2024-02-20",
"payee_name": "12",
"payee_bank": "12",
"payee_account": "121",
"remark": "212",
"annex": [
{
"uri": "https:\/\/ceshi-engineering.lihaink.cn\/uploads\/files\/20240205\/20240205112036d89cc6685.jpg",
"name": "20210719150601_4401e.jpg"
}
],
"bank_account_id": 8,
"trip_apply_code": "项目出差-20240201-116911",
"project_name": "第一个项目",
"project_code": "P-20240126-717033",
"project_manager": "",
"loan_apply_code": "项目借款-20240205-930890",
"loan_amount": "12.00",
"reimbursement_type_text": "借款冲抵",
"total_amount": 60,
"pay_amount": 48,
"bank_account": {
"account_sn": "BANK-20240129-566530",
"deposit_bank": "张伟银行",
"account_name": "张伟",
"account": "158845845"
},
"approve_id": 5
})
//
const setFormData = async (data: Record<any, any>) => {
Object.assign(formData, data)
}
//
const open = () => {
popupRef.value?.open()
}
//
const handleClose = () => {
emit('close')
}
defineExpose({
open,
setFormData,
})
</script>
<style lang="scss" scoped>
.tit {
font-size: 1.2em;
margin-bottom: 10px;
}
:deep(.my-label) {
width: 150px;
}
</style>

View File

@ -194,10 +194,7 @@
</el-table>
</div>
</el-col>
<flowProcess @confirm="flowFn" v-if="mode == 'add'"></flowProcess>
<!-- const flowFn = (e: any) => {
formData.approve_detail = e
} -->
</el-form>
<el-dialog v-model="showDialog" title="选择出差申请单" width="70%">
@ -352,11 +349,13 @@ const formData = reactive({
"account_name": "",
"account": ""
},
approve_detail: {}
// approve_detail: {
// flow_type: 1,
// flow_path: 1,
// path: "asa/ssa"
// },
})
const flowFn = (e: any) => {
formData.approve_detail = e
}
//
const handleAvatarSuccess_four = (response: any) => {
// @ts-ignore
@ -377,12 +376,12 @@ const handleAvatarSuccess_four1 = (response: any) => {
const formRules = reactive<any>({
trip_apply_id: [{
required: true,
message: '请输入出差申请单id',
message: '不能为空',
trigger: ['blur']
}],
project_id: [{
required: true,
message: '请输入项目id',
message: '不能为空',
trigger: ['blur']
}],
reimbursement_type: [{
@ -392,7 +391,7 @@ const formRules = reactive<any>({
}],
loan_apply_id: [{
required: true,
message: '请输入借款单id',
message: '不能为空',
trigger: ['blur']
}],
reimbursement_amount: [{
@ -437,7 +436,7 @@ const formRules = reactive<any>({
}],
bank_account_id: [{
required: true,
message: '请输入付款银行账户id',
message: '不能为空',
trigger: ['blur']
}]
})

View File

@ -2,18 +2,11 @@
<div>
<el-card class="!border-none mb-4" shadow="never">
<el-form class="mb-[-16px]" :model="queryParams" inline>
<el-form-item label="出差申请单id" prop="trip_apply_id">
<el-input class="w-[280px]" v-model="queryParams.trip_apply_id" clearable placeholder="请输入出差申请单id" />
</el-form-item>
<el-form-item label="项目id" prop="project_id">
<el-input class="w-[280px]" v-model="queryParams.project_id" clearable placeholder="请输入项目id" />
</el-form-item>
<el-form-item label="报销类型" prop="reimbursement_type">
<el-input class="w-[280px]" v-model="queryParams.reimbursement_type" clearable placeholder="请输入报销类型" />
</el-form-item>
<el-form-item label="借款单id" prop="loan_apply_id">
<el-input class="w-[280px]" v-model="queryParams.loan_apply_id" clearable placeholder="请输入借款单id" />
</el-form-item>
<el-form-item label="报销人" prop="apply_user">
<el-input class="w-[280px]" v-model="queryParams.apply_user" clearable placeholder="请输入报销人" />
</el-form-item>
@ -58,6 +51,10 @@
@click="handleDelete(row.id)">
删除
</el-button>
<el-button v-perms="['project.project_travel_reimbursement/detail']" link
@click="handledetail(row)">
详情
</el-button>
</template>
</el-table-column>
</el-table>
@ -67,6 +64,8 @@
</div>
</el-card>
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
</div>
</template>
@ -74,14 +73,16 @@
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiProjectTravelReimbursementLists, apiProjectTravelReimbursementDelete, apiProjectTravelReimbursementDetail } from '@/api/project_travel_reimbursement'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
import EditPopup from './edit.vue'
import DetailPopup from './detail.vue'
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
//
const showEdit = ref(false)
const showDtail = ref(false)
//
const queryParams = reactive({
@ -132,6 +133,14 @@ const handleDelete = async (id: number | any[]) => {
getLists()
}
//
const handledetail = async (data: any) => {
let res = await apiProjectTravelReimbursementDetail({ id: data.id })
showDtail.value = true
await nextTick()
detailRef.value?.open()
detailRef.value?.setFormData(res)
}
import { useRoute } from "vue-router";
const route = useRoute()
if (route.query?.listId) {

View File

@ -0,0 +1,129 @@
<template>
<div class="detail-popup">
<popup ref="popupRef" :async="true" width="80%" @close="handleClose">
<el-card>
<el-descriptions :column="3" title="费用报销详情" border>
<el-descriptions-item :label="item.lable" label-align="left" align="left" label-class-name="my-label"
v-for="(item, index) in descriptionList" :key="index">
<span v-if="item.lable != '附件'"> {{ item.value.length > 1 ? formData[item.value[0]][item.value[1]] :
formData[item.value[0]]
}}</span>
<span v-else> <el-link class="m-2" v-for="item in formData.annex" :href="item.uri"
target="_blank">{{ item.name }}</el-link>
</span>
</el-descriptions-item>
</el-descriptions>
</el-card>
</popup>
</div>
</template>
<script lang="ts" setup name="customdetail">
import { ref, reactive } from "vue"
const descriptionList = reactive([
{
lable: "项目名称",
value: ['project_name']
},
{
lable: "项目编码",
value: ['project_code']
},
{
lable: "出差起始地",
value: ['origin_address']
},
{
lable: "出差目的地",
value: ['target_address']
},
{
lable: "交通工具",
value: ['traffic_text']
},
{
lable: "出差时间",
value: ['start_date']
},
{
lable: "结束时间",
value: ['end_date']
},
{
lable: "出差事由",
value: ['reason']
},
{
lable: "历史天数",
value: ['days']
},
{
lable: "备注",
value: ['remark']
},
{
lable: "附件",
value: ['annex']
},
])
const emit = defineEmits(['success', 'close'])
const popupRef = ref(null)
//
const formData: any = reactive({
// "id": 9,
// "project_id": 18,
// "trip_apply_code": "-20240201-116911",
// "origin_address": "",
// "target_address": "",
// "traffic": 3,
// "start_date": "2024-02-01",
// "end_date": "2024-02-10",
// "reason": "",
// "days": 9,
// "remark": "",
// "annex": "",
// "traffic_text": "",
// "project_name": "",
// "project_code": "P-20240126-717033",
// "project_manager": "",
// "approve_id": null
})
//
const setFormData = async (data: Record<any, any>) => {
Object.assign(formData, data)
}
//
const open = () => {
popupRef.value?.open()
}
//
const handleClose = () => {
emit('close')
}
defineExpose({
open,
setFormData,
})
</script>
<style lang="scss" scoped>
.tit {
font-size: 1.2em;
margin-bottom: 10px;
}
:deep(.my-label) {
width: 150px;
}
</style>

View File

@ -60,10 +60,7 @@
</div>
</el-form-item>
</el-col>
<flowProcess @confirm="flowFn" v-if="mode == 'add'"></flowProcess>
<!-- const flowFn = (e: any) => {
formData.approve_detail = e
} -->
</el-form>
<el-dialog v-model="showDialog" title="选择项目" width="70%">
@ -78,13 +75,10 @@
import type { FormInstance } from 'element-plus'
import Popup from '@/components/popup/index.vue'
import { apiProjectTripApplyAdd, apiProjectTripApplyEdit, apiProjectTripApplyDetail } from '@/api/project_trip_apply'
import { timeFormat } from '@/utils/util'
import type { PropType } from 'vue'
import projectDialog from '@/components/project/index.vue'
import configs from "@/config"
import useUserStore from "@/stores/modules/user";
import { deptAll } from '@/api/org/department'
import { getAll } from '@/api/org/organization'
const base_url = configs.baseUrl + configs.urlPrefix
@ -122,11 +116,13 @@ const formData = reactive({
"remark": "",
"annex": [],
days: "",
approve_detail: {}
// approve_detail: {
// flow_type: 1,
// flow_path: 1,
// path: "asas/asa"
// }
})
const flowFn = (e: any) => {
formData.approve_detail = e
}
//
const handleAvatarSuccess_four = (response: any) => {
// @ts-ignore
@ -188,6 +184,7 @@ const setFormData = async (data: Record<any, any>) => {
}
}
formData.traffic = String(formData.traffic)
formData.annex = []
}
const getDetail = async (row: Record<string, any>) => {

View File

@ -63,6 +63,9 @@
@click="handleDelete(row.id)">
删除
</el-button>
<el-button v-perms="['project.project_trip_apply/detail']" link @click="handledetail(row)">
详情
</el-button>
</template>
</el-table-column>
</el-table>
@ -72,6 +75,8 @@
</div>
</el-card>
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
</div>
</template>
@ -83,9 +88,15 @@ import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
import EditPopup from './edit.vue'
import { nextTick, reactive, ref } from "vue"
import DetailPopup from './detail.vue'
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
//
const showEdit = ref(false)
const showDtail = ref(false)
//
@ -136,6 +147,15 @@ const handleDelete = async (id: number | any[]) => {
await apiProjectTripApplyDelete({ id })
getLists()
}
//
const handledetail = async (data: any) => {
let res = await apiProjectTripApplyDetail({ id: data.id })
showDtail.value = true
await nextTick()
detailRef.value?.open()
detailRef.value?.setFormData(res)
}
import { useRoute } from "vue-router";
const route = useRoute()
if (route.query?.listId) {

View File

@ -156,10 +156,7 @@
</el-form-item>
</el-col>
</el-row>
<flowProcess @confirm="flowFn" v-if="mode == 'add'"></flowProcess>
<!-- const flowFn = (e: any) => {
formData.approve_detail = e
} -->
<el-dialog v-model="showDialog1" title="选择合同" width="70%">
<contractDialog @customEvent="customEvent1" :project_id="project?.id || ''"></contractDialog>
</el-dialog>
@ -304,15 +301,11 @@ const formData = reactive({
return_desc: "",
receiver: "",
bank_account_id: "",
remark: "",
annex: [],
approve_detail: {}
})
const flowFn = (e: any) => {
formData.approve_detail = e
}
//
const formRules = reactive<any>({

View File

@ -149,10 +149,7 @@
</el-col>
</el-row>
<flowProcess @confirm="flowFn" v-if="mode == 'add'"></flowProcess>
<!-- const flowFn = (e: any) => {
formData.approve_detail = e
} -->
<el-dialog v-model="showDialog" title="选择收款银行" width="70%">
<bankaccountDialog @customEvent="customEvent"></bankaccountDialog>
</el-dialog>
@ -284,13 +281,8 @@ const formData = reactive({
"account_name": "",
"account": ""
},
approve_detail: {}
})
const flowFn = (e: any) => {
formData.approve_detail = e
}
//
const formRules = reactive<any>({

View File

@ -118,10 +118,7 @@
</el-form-item>
</el-col>
</el-row>
<flowProcess @confirm="flowFn" v-if="mode == 'add'"></flowProcess>
<!-- const flowFn = (e: any) => {
formData.approve_detail = e
} -->
<el-dialog v-model="showDialog" title="选择投标保证金" width="70%">
<bidbondDialog @customEvent="customEvent" :project_id="project?.id || ''"></bidbondDialog>
@ -250,9 +247,7 @@ const formData = reactive({
approve_detail: {}
})
const flowFn = (e: any) => {
formData.approve_detail = e
}
//
const formRules = reactive<any>({

View File

@ -99,10 +99,7 @@
</el-row>
<flowProcess @confirm="flowFn" v-if="mode == 'add'"></flowProcess>
<!-- const flowFn = (e: any) => {
formData.approve_detail = e
} -->
<el-dialog v-model="showDialog1" title="选择合同" width="70%">
<contractDialog @customEvent="customEvent1"></contractDialog>
</el-dialog>
@ -207,12 +204,9 @@ const formData = reactive({
return_duty_id: '',
remark: "",
annex: [],
approve_detail: {}
})
const flowFn = (e: any) => {
formData.approve_detail = e
}
//
const formRules = reactive<any>({

View File

@ -143,10 +143,7 @@
</el-form-item>
</el-col>
</el-row>
<flowProcess @confirm="flowFn" v-if="mode == 'add'"></flowProcess>
<!-- const flowFn = (e: any) => {
formData.approve_detail = e
} -->
</el-form>
<el-dialog v-model="showDialog" title="选择分包合同" width="70%">
<procurementTable @customEvent="customEvent" :project_id="project?.id || ''"></procurementTable>
@ -279,15 +276,9 @@ const formData = reactive({
negotiation_quotation: [],
negotiation_basis: [],
negotiation_detail: "",
"sign_date": "string",
approve_detail: {
}
"sign_date": "",
})
const flowFn = (e: any) => {
formData.approve_detail = e
}
const customEvent = (e: any) => {
contract_no.value = e.contract_no;
supplier_name.value = e.supplier_name;