代码更新
This commit is contained in:
parent
237ce05d04
commit
24ec121f4e
26
src/api/bank_account.ts
Normal file
26
src/api/bank_account.ts
Normal file
@ -0,0 +1,26 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 银行账户列表
|
||||
export function bankaccountLists(params: any) {
|
||||
return request.get({ url: '/bank.bank_account/lists', params })
|
||||
}
|
||||
|
||||
// 添加银行账户
|
||||
export function bankaccountAdd(params: any) {
|
||||
return request.post({ url: '/bank.bank_account/add', params })
|
||||
}
|
||||
|
||||
// 编辑银行账户
|
||||
export function bankaccountEdit(params: any) {
|
||||
return request.post({ url: '/bank.bank_account/edit', params })
|
||||
}
|
||||
|
||||
// 删除银行账户
|
||||
export function bankaccountDelete(params: any) {
|
||||
return request.post({ url: '/bank.bank_account/delete', params })
|
||||
}
|
||||
|
||||
//银行账户详情
|
||||
export function bankaccountDetail(params: any) {
|
||||
return request.get({ url: '/bank.bank_account/detail', params })
|
||||
}
|
26
src/api/project_subpackage_budget.ts
Normal file
26
src/api/project_subpackage_budget.ts
Normal file
@ -0,0 +1,26 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 分包预算表列表
|
||||
export function subpackagebudgetLists(params: any) {
|
||||
return request.get({ url: '/project.project_subpackage_budget/lists', params })
|
||||
}
|
||||
|
||||
// 添加分包预算
|
||||
export function subpackagebudgetAdd(params: any) {
|
||||
return request.post({ url: '/project.project_subpackage_budget/add', params })
|
||||
}
|
||||
|
||||
// 编辑分包预算
|
||||
export function subpackagebudgetEdit(params: any) {
|
||||
return request.post({ url: '/project.project_subpackage_budget/edit', params })
|
||||
}
|
||||
|
||||
// 删除分包预算
|
||||
export function subpackagebudgetDelete(params: any) {
|
||||
return request.post({ url: '/project.project_subpackage_budget/delete', params })
|
||||
}
|
||||
|
||||
// 分包预算详情
|
||||
export function subpackagebudgetDetail(params: any) {
|
||||
return request.get({ url: '/project.project_subpackage_budget/detail', params })
|
||||
}
|
27
src/api/project_subpackage_budget_detail.ts
Normal file
27
src/api/project_subpackage_budget_detail.ts
Normal file
@ -0,0 +1,27 @@
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 分包预算明细表列表
|
||||
export function subpackagdetailLists(params: any) {
|
||||
return request.get({ url: '/project.project_subpackage_budget_detail/lists', params })
|
||||
}
|
||||
|
||||
// 添加分包预算明细
|
||||
export function subpackagdetailAdd(params: any) {
|
||||
return request.post({ url: '/project.project_subpackage_budget_detail/add', params })
|
||||
}
|
||||
|
||||
// 编辑分包预算明细
|
||||
export function subpackagdetailEdit(params: any) {
|
||||
return request.post({ url: '/project.project_subpackage_budget_detail/edit', params })
|
||||
}
|
||||
|
||||
// 删除分包预算明细
|
||||
export function subpackagdetailDelete(params: any) {
|
||||
return request.post({ url: '/project.project_subpackage_budget_detail/delete', params })
|
||||
}
|
||||
|
||||
// 分包预算明细详情
|
||||
export function subpackagdetailDetail(params: any) {
|
||||
return request.get({ url: '/project.project_subpackage_budget_detail/detail', params })
|
||||
}
|
68
src/components/subpackage_budget/index.vue
Normal file
68
src/components/subpackage_budget/index.vue
Normal file
@ -0,0 +1,68 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- <el-card class="!border-none" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="查询" prop="name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.name" clearable placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card> -->
|
||||
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @cell-click="handleCurrentChange">
|
||||
<el-table-column label="序号" type="index" />
|
||||
<el-table-column label="预算单号" prop="subpackage_budget_code" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="项目编码" prop="project_code" show-overflow-tooltip />
|
||||
<el-table-column label="剩余预算工作量" prop="residue_num" show-overflow-tooltip />
|
||||
<el-table-column label="预算总工作量" prop="total_num" show-overflow-tooltip />
|
||||
<el-table-column label="预算总金额" prop="total_amount" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
||||
|
||||
|
||||
|
||||
|
||||
</el-table>
|
||||
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { usePaging } from "@/hooks/usePaging"
|
||||
import { useDictData } from "@/hooks/useDictOptions"
|
||||
import { subpackagebudgetLists } from '@/api/project_subpackage_budget'
|
||||
import { defineEmits } from "vue"
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
// name: ''
|
||||
});
|
||||
|
||||
const { dictData } = useDictData('supplier_grade,supplier_group,supplier_category,sex')
|
||||
|
||||
// 选中数据
|
||||
const emits = defineEmits(["customEvent"]);
|
||||
|
||||
// 选中数据子父传递
|
||||
const handleCurrentChange = (value: any) => {
|
||||
emits("customEvent", value);
|
||||
};
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: subpackagebudgetLists,
|
||||
params: queryParams,
|
||||
});
|
||||
|
||||
getLists();
|
||||
</script>
|
83
src/components/subpackage_budget_detail/index.vue
Normal file
83
src/components/subpackage_budget_detail/index.vue
Normal file
@ -0,0 +1,83 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- <el-card class="!border-none" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="查询" prop="name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.name" clearable placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card> -->
|
||||
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @cell-click="handleCurrentChange">
|
||||
<el-table-column label="序号" type="index" />
|
||||
<el-table-column label="预算单号" prop="subpackage_budget_code" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="项目编码" prop="project_code" 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="unit" show-overflow-tooltip />
|
||||
<!-- <el-table-column label="首次预算工作量" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column label="预算调整工作量" prop="remark" 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-column label="已分包工作量" prop="has_subcontract_num" show-overflow-tooltip />
|
||||
<el-table-column label="剩余预算工作量" prop="residue_num" show-overflow-tooltip />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</el-table>
|
||||
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { usePaging } from "@/hooks/usePaging"
|
||||
import { useDictData } from "@/hooks/useDictOptions"
|
||||
import { subpackagdetailLists } from '@/api/project_subpackage_budget_detail'
|
||||
|
||||
import { defineEmits } from "vue"
|
||||
|
||||
const props = defineProps({
|
||||
project_id: {
|
||||
type: String
|
||||
}
|
||||
})
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
|
||||
project_id: props.project_id
|
||||
});
|
||||
const { dictData } = useDictData('supplier_grade,supplier_group,supplier_category,sex')
|
||||
|
||||
// 选中数据
|
||||
const emits = defineEmits(["customEvent"]);
|
||||
|
||||
// 选中数据子父传递
|
||||
const handleCurrentChange = (value: any) => {
|
||||
emits("customEvent", value);
|
||||
};
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: subpackagdetailLists,
|
||||
params: queryParams,
|
||||
});
|
||||
|
||||
getLists();
|
||||
</script>
|
159
src/views/bank_account/detail.vue
Normal file
159
src/views/bank_account/detail.vue
Normal file
@ -0,0 +1,159 @@
|
||||
|
||||
|
||||
|
||||
<template>
|
||||
<div class="detail-popup">
|
||||
<popup ref="popupRef" title="投标决策详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-descriptions :column="3" border>
|
||||
<el-descriptions-item label="流程编号" label-align="left" align="left" label-class-name="my-label">{{ formData.code }}</el-descriptions-item>
|
||||
<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.custom_name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="项目估算(万元)" label-align="left" align="left" label-class-name="my-label">{{ formData.project_estimation }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="招标项目资金来源" label-align="left" align="left" label-class-name="my-label">{{ formData.bidding_project_fund_source }}</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="投标时间" label-align="left" align="left" label-class-name="my-label">{{ formData.bidding_time }}</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="招标方式" label-align="left" align="left" label-class-name="my-label">{{ formData.bid_type }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="竞争对手" label-align="left" align="left" label-class-name="my-label">{{ formData.competitor }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="是否需要保证金" label-align="left" align="left" label-class-name="my-label">{{ formData.is_margin }}</el-descriptions-item>
|
||||
<el-descriptions-item label="保证金金额(元)" label-align="left" align="left" label-class-name="my-label">{{ formData.margin_amount }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="开标日期" label-align="left" align="left" label-class-name="my-label">{{ formData.bid_opening_date }}</el-descriptions-item>
|
||||
<el-descriptions-item label="保证金退还时间" label-align="left" align="left" label-class-name="my-label">{{ formData.margin_amount_return_date }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="有无内部资源" label-align="left" align="left" label-class-name="my-label">{{ formData.is_internal_resources }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="项目把握度" label-align="left" align="left" label-class-name="my-label">{{ formData.project_assurance }}</el-descriptions-item>
|
||||
<el-descriptions-item label="招标项目概况" label-align="left" align="left" label-class-name="my-label">{{ formData.bid_project_overview }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="项目简介" label-align="left" align="left" label-class-name="my-label">{{ formData.project_desc }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="附件" label-align="left" align="left" label-class-name="my-label">
|
||||
<div v-if="formDataannex.length > 0">
|
||||
<div v-for="(item, index) in formDataannex" style="margin-left: 5px;display: block;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri" target="_blank">{{ item.name }}</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>暂无附件</div>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
</el-descriptions>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="customdetail">
|
||||
|
||||
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: {
|
||||
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 datas = reactive({
|
||||
provinceOptions: [],
|
||||
cityOptions: [],
|
||||
areaOptions: [],
|
||||
});
|
||||
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
|
||||
|
||||
})
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
// for (const key in formData) {
|
||||
// if (data[key] != null && data[key] != undefined) {
|
||||
// //@ts-ignore
|
||||
// formData[key] = data[key]
|
||||
|
||||
// }
|
||||
|
||||
// }
|
||||
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)
|
||||
|
||||
}
|
||||
Object.assign(formData, data)
|
||||
console.log(formData, '2222222222')
|
||||
|
||||
|
||||
}
|
||||
|
||||
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>
|
277
src/views/bank_account/edit.vue
Normal file
277
src/views/bank_account/edit.vue
Normal file
@ -0,0 +1,277 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose">
|
||||
|
||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="组织名称" prop="org_id" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-select v-model="formData.org_id" clearable placeholder="请选择组织" @change="deptrmt">
|
||||
<el-option v-for="(item, index) in list1" :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="部门名称" prop="dept_id" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-select v-model="formData.dept_id" clearable placeholder="请选择部门">
|
||||
<el-option v-for="( item, index ) in list2 " :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="名称" prop="project_id" @click="showDialog = true">
|
||||
<el-input v-model="project_name" clearable placeholder="请输入名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="验收日期" prop="accept_date">
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.accept_date" clearable type="date" value-format="YYYY-MM-DD" placeholder="选择验收日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="验收类型" prop="type">
|
||||
<el-input v-model="formData.type" clearable placeholder="请输入验收类型" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="验收工程师" prop="engineer">
|
||||
<el-input v-model="formData.engineer" clearable placeholder="请输入验收工程师" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="验收内容" prop="content">
|
||||
<el-input v-model="formData.content" clearable placeholder="请输入验收内容" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
|
||||
<el-col :span="24">
|
||||
|
||||
<el-form-item label="附件" prop="field127">
|
||||
<el-upload accept="doc, docx, xls, xlsx, ppt, pptx, pdf, txt, zip, rar, tar, jpg, png, gif, jpeg, webp, wmv, avi, mpg, mpeg, 3gp, mov, mp4, flv, f4v, rmvb, mkv" class="upload-demo" :show-file-list="false" aria-hidden="true" :headers="{ Token: userStore.token }" :action="base_url + '/upload/file'" :on-success="handleAvatarSuccess_four" ref="upload">
|
||||
<el-button type="primary">
|
||||
上传
|
||||
</el-button>
|
||||
</el-upload>
|
||||
|
||||
<div>
|
||||
<div v-for="( item, index ) in formDataannex " style="margin-left: 5px;display: block;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri" target="_blank">{{ item.name }}</a>
|
||||
<span style="cursor: pointer;margin-left: 5px;" @click="delFileFn(index)">x</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-dialog v-model="showDialog" title="选择项目" width="70%">
|
||||
<porjectDialog @customEvent="customEvent"></porjectDialog>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
</el-form>
|
||||
</popup>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="projectEdit">
|
||||
import porjectDialog from '@/components/project/index.vue'
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { bankaccountAdd, bankaccountEdit, bankaccountDetail } from '@/api/bank_account'
|
||||
import { toChinesNum } from "@/utils/util";
|
||||
import { getAllProjectTypes } from '@/api/projecttype'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import { isEmail, isIdCard, isPhone } from '@/utils/validate'
|
||||
import type { PropType } from 'vue'
|
||||
import configs from "@/config"
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
const protype = reactive([])
|
||||
const base_url = configs.baseUrl + configs.urlPrefix
|
||||
const userStore = useUserStore();
|
||||
const active = ref(0)
|
||||
const formDataannex = reactive([])
|
||||
const list1 = reactive([])
|
||||
const list2 = reactive([])
|
||||
const showDialog = ref(false)
|
||||
const project_name = ref('')
|
||||
import { deptAll } from '@/api/org/department'
|
||||
import { getAll } from '@/api/org/organization'
|
||||
const userInfo = userStore.userInfo
|
||||
// 上传文件
|
||||
const handleAvatarSuccess_four = (
|
||||
response,
|
||||
uploadFile
|
||||
) => {
|
||||
if (response.code == 0) {
|
||||
ElMessage.error(response.msg);
|
||||
return;
|
||||
}
|
||||
formDataannex.push(
|
||||
{ uri: response.data.uri, name: response.data.name }
|
||||
|
||||
|
||||
);
|
||||
};
|
||||
|
||||
// 删除上传的文件
|
||||
const delFileFn = (index: number) => {
|
||||
formDataannex.splice(index, 1)
|
||||
}
|
||||
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 mode = ref('add')
|
||||
//获取值
|
||||
const customEvent = (e: any) => {
|
||||
formData.project_id = e.id;
|
||||
project_name.value = e.name;
|
||||
showDialog.value = false;
|
||||
};
|
||||
|
||||
//获取所有组织
|
||||
const getlist = () => {
|
||||
getAll().then((res) => {
|
||||
Object.assign(list1, res)
|
||||
|
||||
})
|
||||
}
|
||||
//获取部门
|
||||
const deptrmt = (e: any) => {
|
||||
formData.dept_id = ''
|
||||
getlist1(e)
|
||||
|
||||
}
|
||||
//获取所有部门
|
||||
const getlist1 = (id: any) => {
|
||||
deptAll({ 'org_id': id }).then((res) => {
|
||||
list2.splice(0, list2.length, ...res)
|
||||
})
|
||||
}
|
||||
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑质量目标表' : '新增质量目标表'
|
||||
})
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
dept_id: '',
|
||||
org_id: "",
|
||||
project_id: "",
|
||||
accept_date: "",
|
||||
type: '',
|
||||
file: '',
|
||||
engineer: "",
|
||||
content: "",
|
||||
remark: "",
|
||||
|
||||
})
|
||||
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
|
||||
})
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
if (data.file && data.file.length > 0) {
|
||||
|
||||
const arry1 = data.file.map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
if (data.dept_id) {
|
||||
getlist1(data.dept_id
|
||||
)
|
||||
}
|
||||
|
||||
project_name.value = data.project_name
|
||||
|
||||
|
||||
}
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await bankaccountDetail({
|
||||
id: row.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.file = JSON.stringify(formDataannex.map((item) => item.uri))
|
||||
}
|
||||
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
||||
const data = { ...formData }
|
||||
mode.value == 'edit'
|
||||
? await bankaccountEdit(data)
|
||||
: await bankaccountAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = 'add') => {
|
||||
mode.value = type
|
||||
popupRef.value?.open()
|
||||
getlist()
|
||||
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
167
src/views/bank_account/index.vue
Normal file
167
src/views/bank_account/index.vue
Normal file
@ -0,0 +1,167 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
|
||||
<el-form-item label="标书审查" prop="bid_document_examination_id">
|
||||
<el-select v-model="queryParams.bid_document_examination_id" clearable placeholder="请选择标书审查">
|
||||
<el-option v-for="(item, index) in documentList" :key="index" :label="item.bid_document_no" :value="parseInt(item.id)" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目" prop="project_id">
|
||||
<el-select v-model="queryParams.project_id" clearable placeholder="请选择项目">
|
||||
<el-option v-for="(item, index) in projectList" :key="index" :label="item.name" :value="parseInt(item.id)" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-button v-perms="['bid.bid_result/add']" type="primary" @click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button v-perms="['bid.bid_result/delete']" :disabled="!selectData.length" @click="handleDelete(selectData)">
|
||||
删除
|
||||
</el-button>
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="序号" type="index" width="55" />
|
||||
|
||||
<el-table-column label="投标编号" prop="bid_document_examination_code" show-overflow-tooltip />
|
||||
<el-table-column label="客户名称" prop="custom_name" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="项目编码" prop="project_code" show-overflow-tooltip />
|
||||
<el-table-column label="投标时间" prop="bidding_time" show-overflow-tooltip />
|
||||
<el-table-column label="开标日期" prop="bid_opening_date" show-overflow-tooltip />
|
||||
<el-table-column label="是否中标" prop="is_successful" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<dict-value :options="dictData.is_successful" :value="row.is_successful" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="中标单位" prop="bidder_company" show-overflow-tooltip />
|
||||
<el-table-column label="中标金额" prop="bidder_amount" show-overflow-tooltip />
|
||||
|
||||
<el-table-column label="操作" width="160" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['bid.bid_result/edit']" type="primary" link @click="handleEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-perms="['bid.bid_result/delete']" type="danger" link @click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button v-perms="['bid.bid_result/detail']" link @click="handledetail(row)">
|
||||
详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
|
||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="bidResultLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { bankaccountLists, bankaccountDelete, bankaccountDetail } from '@/api/bank_account'
|
||||
import {
|
||||
apiBidDocumentExaminationLists
|
||||
} from '@/api/bid_document_examination'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import { apiProjectLists } from '@/api/project'
|
||||
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 projectList = ref([])
|
||||
const documentList = ref([])
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
bid_document_examination_id: '',
|
||||
project_id: ''
|
||||
})
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id)
|
||||
}
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData('is_successful')
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: bankaccountLists,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
// 添加
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('add')
|
||||
}
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
let res = await bankaccountDetail({ id: data.id })
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
await bankaccountDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
//详情
|
||||
const handledetail = async (data: any) => {
|
||||
let res = await bankaccountDetail({ id: data.id })
|
||||
showDtail.value = true
|
||||
await nextTick()
|
||||
detailRef.value?.open()
|
||||
detailRef.value?.setFormData(res)
|
||||
}
|
||||
//获取项目
|
||||
|
||||
const projectlist = async () => {
|
||||
let res = await apiProjectLists({ page_no: 1, page_size: 9999 })
|
||||
projectList.value = res.lists
|
||||
|
||||
}
|
||||
//获取标书审查列表
|
||||
|
||||
const documentlists = async () => {
|
||||
let res = await apiBidDocumentExaminationLists({ page_no: 1, page_size: 9999 })
|
||||
documentList.value = res.lists
|
||||
|
||||
}
|
||||
documentlists()
|
||||
projectlist()
|
||||
getLists()
|
||||
</script>
|
||||
|
@ -121,7 +121,44 @@
|
||||
<el-pagination v-model:current-page="pager2.page_no" v-model:page-size="pager2.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total2" @size-change="handleSizeChange2" @current-change="handleCurrentChange2" />
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="合同" name="new_name_4">Task</el-tab-pane>
|
||||
<el-tab-pane label="合同" name="new_name_4">
|
||||
<div class='tit'>合同</div>
|
||||
<div>
|
||||
<el-table :data="tableData4" stripe style="width: 100%">
|
||||
|
||||
|
||||
<el-table-column label="合同名称" prop="contract_name" show-overflow-tooltip />
|
||||
<el-table-column label="签约日期" prop="contract_date" show-overflow-tooltip />
|
||||
<el-table-column label="合同类型" prop="contract_type_text" show-overflow-tooltip />
|
||||
<el-table-column label="合同金额" prop="amount" show-overflow-tooltip />
|
||||
<el-table-column label="实际合同金额" prop="reality_contract_amount" show-overflow-tooltip />
|
||||
<el-table-column label="已回款" prop="returned_amount" show-overflow-tooltip />
|
||||
<el-table-column label="未回款" prop="not_returned_amount" show-overflow-tooltip />
|
||||
<el-table-column label="已开票" prop="invoicing_amount" show-overflow-tooltip />
|
||||
<el-table-column label="未开票" prop="not_invoicing_amount" show-overflow-tooltip />
|
||||
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
<div style="margin: 10px 0;">
|
||||
<el-pagination v-model:current-page="pager4.page_no" v-model:page-size="pager4.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total4" @size-change="handleSizeChange4" @current-change="handleCurrentChange4" />
|
||||
</div>
|
||||
<div class='tit' style="margin: 20px 0;">合同洽商</div>
|
||||
<div>
|
||||
<el-table :data="tableData5" stripe style="width: 100%">
|
||||
<el-table-column label="洽商编号" prop="negotiation_no" show-overflow-tooltip />
|
||||
<el-table-column label="合同编号" prop="contract_code" show-overflow-tooltip />
|
||||
<el-table-column label="洽商单名称" prop="negotiation_name" show-overflow-tooltip />
|
||||
<el-table-column label="洽商类别" prop="negotiation_type" show-overflow-tooltip />
|
||||
<el-table-column label="签约日期" prop="contract_date" show-overflow-tooltip />
|
||||
<el-table-column label="洽商金额" prop="negotiation_amount" show-overflow-tooltip />
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
<div style="margin: 10px 0;">
|
||||
<el-pagination v-model:current-page="pager5.page_no" v-model:page-size="pager5.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total5" @size-change="handleSizeChange5" @current-change="handleCurrentChange5" />
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="订单" name="new_name_5">Task</el-tab-pane>
|
||||
<el-tab-pane label="发票" name="new_name_6">Task</el-tab-pane>
|
||||
<el-tab-pane label="回款" name="new_name_7">Task</el-tab-pane>
|
||||
@ -162,6 +199,10 @@ import { apiProjectLists } from '@/api/project'
|
||||
import { apiQuotationLists } from '@/api/quotation'
|
||||
import { apiCustomDetail } from '@/api/custom'
|
||||
import { apiCustomServiceLists } from '@/api/custom_service'
|
||||
import { apiCustomContactsLists } from '@/api/custom_contacts'
|
||||
import { apiContractLists } from '@/api/contract'
|
||||
import { apiContractNegotiationLists } from '@/api/contract_negotiation'
|
||||
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { TabsPaneContext } from 'element-plus'
|
||||
import type { PropType } from 'vue'
|
||||
@ -243,25 +284,30 @@ const total8 = ref(0)
|
||||
//条数
|
||||
const handleSizeChange1 = (val: number) => {
|
||||
pager1.page_size = val
|
||||
projectLists()
|
||||
|
||||
}
|
||||
const handleSizeChange2 = (val: number) => {
|
||||
pager2.page_size = val
|
||||
estimateLists()
|
||||
|
||||
quotationLists()
|
||||
}
|
||||
const handleSizeChange3 = (val: number) => {
|
||||
|
||||
pager3.page_size = val
|
||||
competitorLists()
|
||||
customServiceLists()
|
||||
}
|
||||
const handleSizeChange4 = (val: number) => {
|
||||
|
||||
pager4.page_size = val
|
||||
competitorLists()
|
||||
contractLists()
|
||||
|
||||
}
|
||||
const handleSizeChange5 = (val: number) => {
|
||||
|
||||
pager5.page_size = val
|
||||
competitorLists()
|
||||
|
||||
negotiationLists()
|
||||
}
|
||||
const handleSizeChange6 = (val: number) => {
|
||||
|
||||
@ -273,27 +319,31 @@ const handleSizeChange6 = (val: number) => {
|
||||
const handleCurrentChange1 = (val: number) => {
|
||||
console.log(`current page: ${val}`)
|
||||
pager1.page_no = val
|
||||
solutionLists()
|
||||
projectLists()
|
||||
|
||||
}
|
||||
const handleCurrentChange2 = (val: number) => {
|
||||
console.log(`current page: ${val}`)
|
||||
pager2.page_no = val
|
||||
estimateLists()
|
||||
|
||||
quotationLists()
|
||||
}
|
||||
const handleCurrentChange3 = (val: number) => {
|
||||
pager3.page_no = val
|
||||
console.log(`current page: ${val}`)
|
||||
competitorLists()
|
||||
customServiceLists()
|
||||
}
|
||||
const handleCurrentChange4 = (val: number) => {
|
||||
pager4.page_no = val
|
||||
console.log(`current page: ${val}`)
|
||||
competitorLists()
|
||||
contractLists()
|
||||
|
||||
}
|
||||
const handleCurrentChange5 = (val: number) => {
|
||||
pager5page_no = val
|
||||
console.log(`current page: ${val}`)
|
||||
competitorLists()
|
||||
|
||||
negotiationLists()
|
||||
}
|
||||
const handleCurrentChange6 = (val: number) => {
|
||||
pager6.page_no = val
|
||||
@ -317,7 +367,7 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
customContactsLists(data.id)
|
||||
Object.assign(formData, data)
|
||||
pager1.custom_id = data.id
|
||||
pager2.custom_id = data.id
|
||||
@ -329,6 +379,8 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
projectLists()
|
||||
quotationLists()
|
||||
customServiceLists()
|
||||
contractLists()
|
||||
negotiationLists()
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
@ -355,7 +407,18 @@ const open = () => {
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
//获取联系人信息
|
||||
|
||||
const customContactsLists = (id) => {
|
||||
apiCustomContactsLists({
|
||||
'page_size': 1000,
|
||||
'page_no': 1,
|
||||
'custom_id': id
|
||||
}).then((res) => {
|
||||
contactsList.value = res.lists
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
//项目信息
|
||||
const projectLists = () => {
|
||||
@ -379,6 +442,21 @@ const customServiceLists = () => {
|
||||
})
|
||||
}
|
||||
|
||||
//获取合同信息
|
||||
const contractLists = () => {
|
||||
apiContractLists(pager4).then((res) => {
|
||||
tableData4.value = res.lists
|
||||
total4.value = res.count
|
||||
})
|
||||
}
|
||||
|
||||
//获取合同洽商
|
||||
const negotiationLists = () => {
|
||||
apiContractNegotiationLists(pager5).then((res) => {
|
||||
tableData5.value = res.lists
|
||||
total5.value = res.count
|
||||
})
|
||||
}
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
|
@ -21,7 +21,7 @@
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户属性" prop="custom_type">
|
||||
<el-form-item label="客户属性" prop="custom_type" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-select class="flex-1" v-model="formData.custom_type" clearable placeholder="请选择客户属性">
|
||||
<el-option v-for="(item, index) in dictData.custom_type" :key="index" :label="item.name" :value="parseInt(item.value)" />
|
||||
</el-select>
|
||||
@ -37,13 +37,13 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="电话" prop="phone" :rules="[{ validator: checkPhone, trigger: 'blur' }]">
|
||||
<el-form-item label="电话" prop="phone" :rules="[{ required: true, validator: checkPhone, trigger: 'blur' }]">
|
||||
<el-input v-model="formData.phone" placeholder="请输入电话" clearable :style="{ width: '100%' }">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-form-item label="信用度" prop="credit_rating">
|
||||
<el-form-item label="信用度" prop="credit_rating" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-radio-group v-model="formData.credit_rating" placeholder="请选择信用度">
|
||||
<el-radio v-for="(item, index) in dictData.credit_rating" :key="index" :label="parseInt(item.value)">
|
||||
{{ item.name }}
|
||||
|
@ -12,7 +12,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="供应商编码" prop="supplier_id" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="supplier_name" clearable disabled placeholder="系统自动填写" />
|
||||
<el-input v-model="supplier_code" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@ -134,6 +134,7 @@ const project_code = ref('')
|
||||
const project_amount = ref('')
|
||||
const contract_no = ref('')
|
||||
const supplier_name = ref('')
|
||||
const supplier_code = ref('')
|
||||
const userInfo = userStore.userInfo
|
||||
console.log(userInfo, '222222')
|
||||
// 上传文件
|
||||
@ -196,7 +197,8 @@ const showDialog1 = ref(false)
|
||||
|
||||
const customEvent = (e: any) => {
|
||||
formData.supplier_id = e.id;
|
||||
supplier_name.value = e.name;
|
||||
supplier_name.value = e.supplier_name;
|
||||
supplier_code.value = e.supplier_code;
|
||||
showDialog.value = false;
|
||||
};
|
||||
const customEvent1 = (e: any) => {
|
||||
@ -270,9 +272,8 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
project_amount.value = data.contract.amount
|
||||
contract_name.value = data.contract.contract_name;
|
||||
contract_no.value = data.contract.contract_no
|
||||
|
||||
|
||||
|
||||
supplier_code.value = data.supplier_code;
|
||||
supplier_name.value = data.supplier_name;
|
||||
|
||||
}
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
|
@ -10,43 +10,43 @@
|
||||
|
||||
<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.contract_code }}</el-descriptions-item>
|
||||
<el-descriptions-item label="合同编号" label-align="left" align="left" label-class-name="my-label">{{ formData.custom_name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="供应商编码" label-align="left" align="left" label-class-name="my-label">{{ formData.contract_code }}</el-descriptions-item>
|
||||
<el-descriptions-item label="供应商名称" label-align="left" align="left" label-class-name="my-label">{{ formData.custom_name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="合同名称" label-align="left" align="left" label-class-name="my-label">{{ formData.contract_name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="合同编号" label-align="left" align="left" label-class-name="my-label">{{ formData.contract_no }}</el-descriptions-item>
|
||||
<el-descriptions-item label="供应商编码" label-align="left" align="left" label-class-name="my-label">{{ formData.supplier_code }}</el-descriptions-item>
|
||||
<el-descriptions-item label="供应商名称" label-align="left" align="left" label-class-name="my-label">{{ formData.supplier_name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="合同类型" label-align="left" align="left" label-class-name="my-label">
|
||||
{{ formData.contract_type_text }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label=" 签订日期" label-align="left" align="left" label-class-name="my-label">
|
||||
{{ formData.contract_type_text }}
|
||||
<el-descriptions-item label="签订日期" label-align="left" align="left" label-class-name="my-label">
|
||||
{{ formData.signing_date }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="付款方式" label-align="left" align="left" label-class-name="my-label">
|
||||
{{ formData.contract_type_text }}
|
||||
{{ formData.pay_type_text }}
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="账期" label-align="left" align="left" label-class-name="my-label">
|
||||
{{ formData.contract_type_text }}
|
||||
{{ formData.account_period_text }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="合同金额" label-align="left" align="left" label-class-name="my-label">
|
||||
{{ formData.contract_type_text }}
|
||||
{{ formData.contract_amount }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="税率" label-align="left" align="left" label-class-name="my-label">
|
||||
{{ formData.contract_type_text }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="不含税金额" label-align="left" align="left" label-class-name="my-label">
|
||||
{{ formData.contract_type_text }}
|
||||
{{ formData.amount_excluding_tax }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="质保金比例(%)" label-align="left" align="left" label-class-name="my-label">
|
||||
{{ formData.contract_type_text }}
|
||||
{{ formData.retention_money_rate }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="质保金" label-align="left" align="left" label-class-name="my-label">
|
||||
{{ formData.contract_type_text }}
|
||||
{{ formData.retention_money }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="备注" label-align="left" align="left" label-class-name="my-label">
|
||||
{{ formData.contract_type_text }}
|
||||
{{ formData.remark }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="合同附件" label-align="left" align="left" label-class-name="my-label">
|
||||
<div v-if="formDataannex.length > 0">
|
||||
@ -64,19 +64,19 @@
|
||||
<el-tab-pane label="采购明细" name="demo-tabs-2">
|
||||
<div>
|
||||
<el-table :data="tableData" stripe style="width: 100%">
|
||||
<el-table-column label="采购申请单号" prop='customer_demand_name' width="180" />
|
||||
<el-table-column label="材料名称" prop='submission_time' width="180" />
|
||||
<el-table-column label="材料编码" prop='solution_content' />
|
||||
<el-table-column label="规格型号" prop='solution_content' />
|
||||
<el-table-column label="品牌" prop='solution_content' />
|
||||
<el-table-column label="参数说明" prop='solution_content' />
|
||||
<el-table-column label="单位" prop='solution_content' />
|
||||
<el-table-column label="数量" prop='solution_content' />
|
||||
<el-table-column label="合税单价" prop='solution_content' />
|
||||
<el-table-column label="不含税金额" prop='solution_content' />
|
||||
<el-table-column label="含税金额" prop='solution_content' />
|
||||
<el-table-column label="已入库数量" prop='solution_content' />
|
||||
<el-table-column label="未入库数量" prop='solution_content' />
|
||||
<el-table-column label="采购申请单号" prop='material_purchase_request_code' width="180" />
|
||||
<el-table-column label="材料名称" prop='material_name' width="180" />
|
||||
<el-table-column label="材料编码" prop='material_code' />
|
||||
<el-table-column label="规格型号" prop='material_specs' />
|
||||
<el-table-column label="品牌" prop='material_brand' />
|
||||
<el-table-column label="参数说明" prop='material_parameter_description' width="280" />
|
||||
<el-table-column label="单位" prop='material_unit' />
|
||||
<el-table-column label="数量" prop='num' />
|
||||
<el-table-column label="合税单价" prop='price' />
|
||||
<el-table-column label="不含税金额" prop='amount_excluding_tax' />
|
||||
<el-table-column label="含税金额" prop='amount_including_tax' />
|
||||
<el-table-column label="已入库数量" prop="has_storage_num" show-overflow-tooltip />
|
||||
<el-table-column label="未入库数量" prop="not_storage_num" show-overflow-tooltip />
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
@ -87,14 +87,14 @@
|
||||
<el-tab-pane label="收票记录" name="demo-tabs-3">
|
||||
<div>
|
||||
<el-table :data="tableData1" stripe style="width: 100%">
|
||||
<el-table-column label="开票日期" prop='estimate_source_text' width="180" />
|
||||
<el-table-column label="提交人" prop='create_user' width="180" />
|
||||
<el-table-column label="发票类型" prop='quotation_date' />
|
||||
<el-table-column label="发票编号" prop='technician_name' width="180" />
|
||||
<el-table-column label="发票税率" prop='estimate_amount' width="180" />
|
||||
<el-table-column label="发票金额" prop='ask' />
|
||||
<el-table-column label="不含税金额" prop='ask' />
|
||||
<el-table-column label="税额" prop='ask' />
|
||||
<el-table-column label="开票日期" prop='invoicing_date' width="180" />
|
||||
<el-table-column label="提交人" prop='commitor' width="180" />
|
||||
<el-table-column label="发票类型" prop='invoice_type' />
|
||||
<el-table-column label="发票编号" prop='invoice_no' width="180" />
|
||||
<el-table-column label="发票税率(%)" prop='invoice_tax_rate' width="180" />
|
||||
<el-table-column label="发票金额" prop='invoice_amount' />
|
||||
<el-table-column label="不含税金额" prop='amount_excluding_tax' />
|
||||
<el-table-column label="税额" prop='tax' />
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
@ -105,10 +105,10 @@
|
||||
<el-tab-pane label="付款计划" name="demo-tabs-4">
|
||||
<div>
|
||||
<el-table :data="tableData2" stripe style="width: 100%">
|
||||
<el-table-column label="计划付款日期" prop='competitor_name' width="180" />
|
||||
<el-table-column label="期次" prop='competitor_contacts' width="180" />
|
||||
<el-table-column label="状态" prop='competitor_contacts_phone' />
|
||||
<el-table-column label="金额" prop='competitive_power' />
|
||||
<el-table-column label="计划付款日期" prop='pay_date' width="180" />
|
||||
<el-table-column label="期次" prop='period' width="180" />
|
||||
<el-table-column label="状态" prop='status' />
|
||||
<el-table-column label="金额" prop='amount' />
|
||||
<el-table-column label="已付款" prop='competitor_advantages' />
|
||||
<el-table-column label="未付款" prop='competitor_disadvantages' />
|
||||
<el-table-column label="备注" prop='remark' />
|
||||
@ -131,7 +131,6 @@
|
||||
<el-table-column label="付款方式" prop='competitor_disadvantages' />
|
||||
<el-table-column label="付款性质" prop='competitor_disadvantages' />
|
||||
<el-table-column label="付款金额" prop='competitor_disadvantages' />
|
||||
|
||||
<el-table-column label="备注" prop='remark' />
|
||||
|
||||
</el-table>
|
||||
@ -166,9 +165,12 @@
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { apiCustomDetail } from '@/api/custom'
|
||||
import { apiCustomerDemandSolutionLists } from '@/api/customer_demand_solution'
|
||||
import { apiProjectEstimateLists } from '@/api/project_estimate'
|
||||
import { apiCompetitorLists } from '@/api/competitor'
|
||||
import { apiProcurementContractDetailLists } from '@/api/procurement_contract_detail'
|
||||
|
||||
import { apifinancereceiptLists } from '@/api/receiptrecord'
|
||||
import { paymentplanLists } from '@/api/paymentplan'
|
||||
import { paymentapplyLists } from '@/api/paymentrequest'
|
||||
import { apiFinancerefundLists } from '@/api/refundrecord'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { TabsPaneContext } from 'element-plus'
|
||||
|
||||
@ -185,27 +187,27 @@ defineProps({
|
||||
const pager1 = reactive({
|
||||
page_size: 10,
|
||||
page_no: 1,
|
||||
customer_demand_id: ""
|
||||
contract_id: ""
|
||||
})
|
||||
const pager2 = reactive({
|
||||
page_size: 10,
|
||||
page_no: 1,
|
||||
customer_demand_id: ""
|
||||
contract_id: ""
|
||||
})
|
||||
const pager3 = reactive({
|
||||
page_size: 10,
|
||||
page_no: 1,
|
||||
customer_demand_id: ""
|
||||
contract_id: ""
|
||||
})
|
||||
const pager4 = reactive({
|
||||
page_size: 10,
|
||||
page_no: 1,
|
||||
customer_demand_id: ""
|
||||
contract_id: ""
|
||||
})
|
||||
const pager5 = reactive({
|
||||
page_size: 10,
|
||||
page_no: 1,
|
||||
customer_demand_id: ""
|
||||
contract_id: ""
|
||||
})
|
||||
|
||||
const total = ref(0)
|
||||
@ -241,89 +243,110 @@ const formData = reactive({
|
||||
const handleSizeChange1 = (val: number) => {
|
||||
|
||||
pager1.page_size = val
|
||||
solutionLists()
|
||||
procurementContractDetailLists()
|
||||
}
|
||||
const handleSizeChange2 = (val: number) => {
|
||||
|
||||
pager2.page_size = val
|
||||
estimateLists()
|
||||
financereceiptLists()
|
||||
}
|
||||
const handleSizeChange3 = (val: number) => {
|
||||
|
||||
pager3.page_size = val
|
||||
competitorLists()
|
||||
planLists()
|
||||
}
|
||||
const handleSizeChange4 = (val: number) => {
|
||||
|
||||
pager4.page_size = val
|
||||
competitorLists()
|
||||
payapplyLists()
|
||||
|
||||
}
|
||||
const handleSizeChange5 = (val: number) => {
|
||||
|
||||
pager5.page_size = val
|
||||
competitorLists()
|
||||
|
||||
financerefundLists()
|
||||
}
|
||||
|
||||
//分页
|
||||
const handleCurrentChange1 = (val: number) => {
|
||||
console.log(`current page: ${val}`)
|
||||
pager1.page_no = val
|
||||
solutionLists()
|
||||
procurementContractDetailLists()
|
||||
}
|
||||
const handleCurrentChange2 = (val: number) => {
|
||||
console.log(`current page: ${val}`)
|
||||
pager2.page_no = val
|
||||
estimateLists()
|
||||
financereceiptLists()
|
||||
}
|
||||
const handleCurrentChange3 = (val: number) => {
|
||||
pager3.page_no = val
|
||||
console.log(`current page: ${val}`)
|
||||
competitorLists()
|
||||
planLists()
|
||||
}
|
||||
const handleCurrentChange4 = (val: number) => {
|
||||
pager4.page_no = val
|
||||
console.log(`current page: ${val}`)
|
||||
competitorLists()
|
||||
payapplyLists()
|
||||
|
||||
}
|
||||
const handleCurrentChange5 = (val: number) => {
|
||||
pager5.page_no = val
|
||||
console.log(`current page: ${val}`)
|
||||
competitorLists()
|
||||
}
|
||||
// 解决方案列表
|
||||
const solutionLists = () => {
|
||||
apiCustomerDemandSolutionLists(pager1).then((res) => {
|
||||
tableData.value = res.lists
|
||||
|
||||
financerefundLists()
|
||||
}
|
||||
// 采购明细列表
|
||||
const procurementContractDetailLists = () => {
|
||||
apiProcurementContractDetailLists(pager1).then((res) => {
|
||||
tableData.value = res.lists
|
||||
total.value = res.count
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
// 获取项目概算列表
|
||||
const estimateLists = () => {
|
||||
apiProjectEstimateLists(pager2).then((res) => {
|
||||
// 获取收票记录列表
|
||||
const financereceiptLists = () => {
|
||||
apifinancereceiptLists(pager2).then((res) => {
|
||||
tableData1.value = res.lists
|
||||
total1.value = res.count
|
||||
})
|
||||
}
|
||||
|
||||
// 获取竞争对手列表
|
||||
const competitorLists = () => {
|
||||
apiCompetitorLists(pager3).then((res) => {
|
||||
// 获取付款计划列表
|
||||
const planLists = () => {
|
||||
paymentplanLists(pager3).then((res) => {
|
||||
tableData2.value = res.lists
|
||||
total2.value = res.count
|
||||
})
|
||||
}
|
||||
|
||||
//获取付款记录
|
||||
const payapplyLists = () => {
|
||||
paymentapplyLists(pager4).then((res) => {
|
||||
tableData3.value = res.lists
|
||||
total3.value = res.count
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//获取退款记录
|
||||
const financerefundLists = () => {
|
||||
apiFinancerefundLists(pager4).then((res) => {
|
||||
tableData4.value = res.lists
|
||||
total4.value = res.count
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
Object.assign(formData, data)
|
||||
pager1.customer_demand_id = data.id
|
||||
pager2.customer_demand_id = data.id
|
||||
pager3.customer_demand_id = data.id
|
||||
pager1.contract_id = data.id
|
||||
pager2.contract_id = data.id
|
||||
pager3.contract_id = data.id
|
||||
pager4.contract_id = data.id
|
||||
pager5.contract_id = data.id
|
||||
if (data.annex && data.annex.length > 0) {
|
||||
const arry1 = data.annex.map((item: any, index: any) => {
|
||||
return {
|
||||
@ -333,9 +356,11 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
}
|
||||
competitorLists()
|
||||
solutionLists()
|
||||
estimateLists()
|
||||
planLists()
|
||||
procurementContractDetailLists()
|
||||
financereceiptLists()
|
||||
payapplyLists()
|
||||
financerefundLists()
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
|
@ -267,6 +267,7 @@ const project_name = ref('')
|
||||
const project_code = ref('')
|
||||
const supplier_name = ref('')
|
||||
const supplier_code = ref('')
|
||||
const contract_no = ref('')
|
||||
const amount = ref('')
|
||||
const amount_excluding_tax = ref('')
|
||||
const amount_daxie = ref('')
|
||||
@ -328,17 +329,17 @@ const popupTitle = computed(() => {
|
||||
const procurementList = (id) => {
|
||||
apiProcurementContractDetailLists({ 'page_no': 1, 'page_size': 5000, 'contract_id': id }).then((res) => {
|
||||
const data = res.lists.map((item: any) => ({
|
||||
'id': res.lists[0].id,
|
||||
'material_purchase_request_detail_id': res.lists[0].material_purchase_request_detail_id,
|
||||
'material_name': res.lists[0].material_name,
|
||||
'material_code': res.lists[0].material_code,
|
||||
'material_unit': res.lists[0].material_unit,
|
||||
'material_brand': res.lists[0].material_brand,
|
||||
'material_purchase_request_code': res.lists[0].material_purchase_request_code,
|
||||
'material_specs': res.lists[0].material_specs,
|
||||
'num': res.lists[0].num,
|
||||
'price': res.lists[0].price,
|
||||
'tax_rate': props.dictData.tax_rate.find((item) => item.name == res.lists[0].tax_rate)
|
||||
'id': item.id,
|
||||
'material_purchase_request_detail_id': item.material_purchase_request_detail_id,
|
||||
'material_name': item.material_name,
|
||||
'material_code': item.material_code,
|
||||
'material_unit': item.material_unit,
|
||||
'material_brand': item.material_brand,
|
||||
'material_purchase_request_code': item.material_purchase_request_code,
|
||||
'material_specs': item.material_specs,
|
||||
'num': item.num,
|
||||
'price': item.price,
|
||||
'tax_rate': props.dictData.tax_rate.find((item) => item.name == item.tax_rate)
|
||||
}))
|
||||
|
||||
materialList.splice(0, materialList.length, ...data);
|
||||
@ -349,10 +350,10 @@ const procurementList = (id) => {
|
||||
const paymentplanList = (id: any) => {
|
||||
paymentplanLists({ 'page_no': 1, 'page_size': 5000, 'contract_type': 1, 'contract_id': id }).then((res) => {
|
||||
const data = res.lists.map((item: any) => ({
|
||||
'period': res.lists[0].period,
|
||||
'pay_date': res.lists[0].pay_date,
|
||||
'amount': res.lists[0].amount,
|
||||
'remark': res.lists[0].remark,
|
||||
'period': item.period,
|
||||
'pay_date': item.pay_date,
|
||||
'amount': item.amount,
|
||||
'remark': item.remark,
|
||||
|
||||
}))
|
||||
paymentList.splice(0, paymentList.length, ...data);
|
||||
@ -396,7 +397,7 @@ const formData = reactive({
|
||||
org_id: '',
|
||||
supplier_id: '',
|
||||
project_id: '',
|
||||
contract_no: '',
|
||||
contract_name: '',
|
||||
contract_type: '',
|
||||
signing_date: '',
|
||||
pay_type: '',
|
||||
@ -499,9 +500,11 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
}
|
||||
procurementList(data.id)
|
||||
paymentplanList(data.id)
|
||||
project_name.value = data.project.name
|
||||
project_code.value = data.project.project_code
|
||||
|
||||
project_name.value = data.project_name
|
||||
project_code.value = data.project_code
|
||||
contract_no.value = data.contract_no
|
||||
supplier_name.value = data.supplier_name
|
||||
supplier_code.value = data.supplier_code
|
||||
|
||||
}
|
||||
|
||||
@ -527,13 +530,13 @@ const handleSubmit = async () => {
|
||||
}
|
||||
|
||||
if (paymentList.length > 0) {
|
||||
formData.payment_plan = JSON.stringify(JSON.stringify(paymentList.map((item) => ({
|
||||
formData.payment_plan = JSON.stringify(paymentList.map((item) => ({
|
||||
'id': item.id,
|
||||
'period': item.period,
|
||||
'remark': item.remark,
|
||||
'amount': item.amount,
|
||||
'pay_date': item.pay_date,
|
||||
}))))
|
||||
})))
|
||||
}
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData, }
|
||||
|
@ -35,7 +35,6 @@
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
|
||||
<el-table-column label="序号" type="index" width="55" show-overflow-tooltip />
|
||||
<el-table-column label="处理流程" prop="supplier_id" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
@ -44,7 +43,7 @@
|
||||
<el-table-column label="供应商名称" prop="supplier_name" show-overflow-tooltip />
|
||||
<el-table-column label="合同类型" prop="contract_type" show-overflow-tooltip />
|
||||
<el-table-column label="签订日期" prop="signing_date" show-overflow-tooltip />
|
||||
<el-table-column label="合同金额" prop="amount" show-overflow-tooltip />
|
||||
<el-table-column label="合同金额" prop="contract_amount" show-overflow-tooltip />
|
||||
<el-table-column label="已付款金额" prop="has_pay_amount" show-overflow-tooltip />
|
||||
<el-table-column label="已开票金额" prop="has_invoice_amount" show-overflow-tooltip />
|
||||
<el-table-column label="未付款金额" prop="not_pay_amount" show-overflow-tooltip />
|
||||
@ -52,7 +51,7 @@
|
||||
<el-table-column label="退款金额" prop="refund_amount" show-overflow-tooltip />
|
||||
<el-table-column label="已入库数量" prop="has_storage_num" show-overflow-tooltip />
|
||||
<el-table-column label="未入库数量" prop="not_storage_num" show-overflow-tooltip />
|
||||
<el-table-column label="数量" prop="retention_money" show-overflow-tooltip />
|
||||
<el-table-column label="数量" prop="num" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="160" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['contract.procurement_contract/edit']" type="primary" link @click="handleEdit(row)">
|
||||
|
@ -31,14 +31,10 @@
|
||||
<el-table-column label="序号" type="index" width="55" show-overflow-tooltip />
|
||||
<el-table-column label="项目编码" prop="project_code" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="合同编号" prop="contract_code" show-overflow-tooltip />
|
||||
<el-table-column label="供应商合同号" prop="num" show-overflow-tooltip />
|
||||
<el-table-column label="供应商名称" prop="unit_price_including_tax" show-overflow-tooltip />
|
||||
<el-table-column label="合同类型" prop="contract_type">
|
||||
<template #default="{ row }">
|
||||
<dict-value :options="dictData.procurement_contract_type" :value="row.contract_type" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同编号" prop="contract_no" show-overflow-tooltip />
|
||||
<el-table-column label="供应编号" prop="supplier_code" show-overflow-tooltip />
|
||||
<el-table-column label="供应商名称" prop="supplier_name" show-overflow-tooltip />
|
||||
<el-table-column label="合同类型" prop="contract_type" show-overflow-tooltip />
|
||||
<el-table-column label="税率" prop="tax_rate">
|
||||
<template #default="{ row }">
|
||||
<dict-value :options="dictData.tax_rate" :value="row.tax_rate" />
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,15 @@
|
||||
<div class="edit-popup">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||
<div style="display: flex; flex-direction: row-reverse; justify-content: flex-start;margin-bottom: 30px;">
|
||||
|
||||
<el-select class="w-[180px]" v-model="formData.dept_id" clearable placeholder="请选择部门">
|
||||
<el-option v-for="(item, index) in list2" :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
<el-select class="w-[180px]" v-model="formData.org_id" clearable placeholder="请选择组织" @change="deptrmt">
|
||||
<el-option v-for="(item, index) in list1" :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</div>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户名称" prop="custom_name" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
@ -232,7 +240,10 @@ const protype = reactive([])
|
||||
const base_url = configs.baseUrl + configs.urlPrefix
|
||||
const formDataannex = reactive([])
|
||||
const userStore = useUserStore();
|
||||
|
||||
const list1 = reactive([])
|
||||
const list2 = reactive([])
|
||||
import { deptAll } from '@/api/org/department'
|
||||
import { getAll } from '@/api/org/organization'
|
||||
// 上传文件
|
||||
const handleAvatarSuccess_four = (
|
||||
response,
|
||||
@ -269,6 +280,34 @@ const customEvent = (e: any) => {
|
||||
formData.custom_name = e.name;
|
||||
showDialog.value = false;
|
||||
};
|
||||
//获取所有组织
|
||||
const getlist = () => {
|
||||
getAll().then((res) => {
|
||||
Object.assign(list1, res)
|
||||
if (res.length > 0 && !formData.org_id) {
|
||||
formData.org_id = res[0].id
|
||||
deptAll({ 'org_id': res[0].id }).then((res) => {
|
||||
if (res.length > 0) {
|
||||
Object.assign(list2, res)
|
||||
formData.dept_id = res[0].id
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
//获取部门
|
||||
const deptrmt = (e: any) => {
|
||||
formData.dept_id = ''
|
||||
getlist1(e)
|
||||
|
||||
}
|
||||
//获取所有部门
|
||||
const getlist1 = (id: any) => {
|
||||
deptAll({ 'org_id': id }).then((res) => {
|
||||
list2.splice(0, list2.length, ...res)
|
||||
})
|
||||
}
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑项目表' : '新增项目表'
|
||||
@ -277,6 +316,8 @@ const popupTitle = computed(() => {
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
dept_id: '',
|
||||
org_id: '',
|
||||
name: '',
|
||||
custom_id: '',
|
||||
custom_name: '',
|
||||
@ -324,6 +365,9 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
if (data.dept_id) {
|
||||
getlist1(data.org_id)
|
||||
}
|
||||
if (data.annex && data.annex.length > 0) {
|
||||
|
||||
const arry1 = data.annex.map((item: any, index: any) => {
|
||||
@ -367,7 +411,7 @@ const handleSubmit = async () => {
|
||||
const open = (type = 'add') => {
|
||||
mode.value = type
|
||||
popupRef.value?.open()
|
||||
|
||||
getlist()
|
||||
getAllProjectTypes().then((res) => {
|
||||
|
||||
protype.splice(0, protype.length, ...res);
|
||||
|
@ -1,7 +1,9 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline label-width="auto">
|
||||
|
||||
<el-form-item label="客户名称" prop="custom_name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.custom_name" clearable placeholder="请输入客户昵称" />
|
||||
</el-form-item>
|
||||
@ -135,6 +137,7 @@ 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)
|
||||
|
||||
@ -142,8 +145,10 @@ const showDtail = ref(false)
|
||||
|
||||
|
||||
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
|
||||
custom_name: '',
|
||||
project_type: '',
|
||||
project_code: '',
|
||||
|
@ -286,6 +286,7 @@
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="合同" name="demo-4">
|
||||
<div class='tit'>主合同</div>
|
||||
<div>
|
||||
<el-table :data="tableData19" stripe style="width: 100%">
|
||||
<el-table-column label="合同编号" prop='contract_name' width="180" />
|
||||
@ -305,6 +306,7 @@
|
||||
<div style="margin: 10px 0;">
|
||||
<el-pagination v-model:current-page="pager19.page_no" v-model:page-size="pager19.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total18" @size-change="handleSizeChange19" @current-change="handleCurrentChange19" />
|
||||
</div>
|
||||
<div class='tit' style="margin: 20px 0;">合同洽商</div>
|
||||
<div>
|
||||
<el-table :data="tableData20" stripe style="width: 100%">
|
||||
<el-table-column label="洽商编号" prop='negotiation_no' width="180" />
|
||||
@ -320,13 +322,181 @@
|
||||
<el-pagination v-model:current-page="pager20.page_no" v-model:page-size="pager20.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total19" @size-change="handleSizeChange20" @current-change="handleCurrentChange20" />
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="预算" name="demo-5">User</el-tab-pane>
|
||||
<el-tab-pane label="计划" name="demo-6">Config</el-tab-pane>
|
||||
<el-tab-pane label="材料" name="demo-7">Role</el-tab-pane>
|
||||
<el-tab-pane label="采购" name="demo-8">Task</el-tab-pane>
|
||||
<el-tab-pane label="分包" name="demo-9">Config</el-tab-pane>
|
||||
<el-tab-pane label="进度" name="demo-10">Role</el-tab-pane>
|
||||
<el-tab-pane label="任务" name="demo-11">Task</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="预算" name="demo-5">
|
||||
<div class='tit'>分包预算</div>
|
||||
<div>
|
||||
<el-table :data="tableData21" stripe style="width: 100%">
|
||||
<el-table-column label="工作类型" prop='work_type' width="180" />
|
||||
<el-table-column label="工作内容" prop='work_content' width="180" />
|
||||
<el-table-column label="项目特征" prop='project_features' />
|
||||
<el-table-column label="单位" prop='unit' />
|
||||
<!-- <el-table-column label="首次预算量" prop='classification' />
|
||||
<el-table-column label="预算调整量" prop='is_solve_text' /> -->
|
||||
<el-table-column label="预算工作量" prop='num' />
|
||||
<el-table-column label="单价" prop='price' />
|
||||
<el-table-column label="金额" prop='amount' />
|
||||
<el-table-column label="已分包量" prop='has_subcontract_num' />
|
||||
<el-table-column label="剩余工作量" prop='residue_num' />
|
||||
</el-table>
|
||||
</div>
|
||||
<div style="margin: 10px 0;">
|
||||
<el-pagination v-model:current-page="pager21.page_no" v-model:page-size="pager21.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total20" @size-change="handleSizeChange21" @current-change="handleCurrentChange21" />
|
||||
</div>
|
||||
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="采购" name="demo-8">
|
||||
<div class='tit'>采购合同</div>
|
||||
<div>
|
||||
<el-table :data="tableData26" stripe style="width: 100%">
|
||||
<el-table-column label="合同编号" prop="contract_no" show-overflow-tooltip />
|
||||
<el-table-column label="供应商名称" prop="contract_name" show-overflow-tooltip />
|
||||
<el-table-column label="合同类型" prop="contract_type" show-overflow-tooltip />
|
||||
<el-table-column label="签订日期" prop="signing_date" show-overflow-tooltip />
|
||||
<el-table-column label="合同金额" prop="contract_amount" show-overflow-tooltip />
|
||||
<!-- <el-table-column label="实际合同金额" prop="negotiation_amount" show-overflow-tooltip /> -->
|
||||
<el-table-column label="已付款金额" prop="has_pay_amount" show-overflow-tooltip />
|
||||
<el-table-column label="未付款金额" prop="not_pay_amount" show-overflow-tooltip />
|
||||
<el-table-column label="已开票金额" prop="invoice_amount" show-overflow-tooltip />
|
||||
<el-table-column label="未开票金额" prop="not_invoice_amount" show-overflow-tooltip />
|
||||
<el-table-column label="已入库数量" prop="has_storage_num" show-overflow-tooltip />
|
||||
<el-table-column label="未入库数量" prop="not_storage_num" show-overflow-tooltip />
|
||||
<el-table-column label="数量" prop="num" show-overflow-tooltip />
|
||||
</el-table>
|
||||
</div>
|
||||
<div style="margin: 10px 0;">
|
||||
<el-pagination v-model:current-page="pager26.page_no" v-model:page-size="pager26.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total25" @size-change="handleSizeChange26" @current-change="handleCurrentChange26" />
|
||||
</div>
|
||||
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="分包" name="demo-9">
|
||||
|
||||
<div class='tit'>分包合同</div>
|
||||
<div>
|
||||
<el-table :data="tableData27" stripe style="width: 100%">
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="合同编号" prop="contract_no" show-overflow-tooltip />
|
||||
<el-table-column label="合同名称" prop="contract_name" show-overflow-tooltip />
|
||||
<el-table-column label="供应商名称" prop="supplier_name" show-overflow-tooltip />
|
||||
<el-table-column label="签订日期" prop="signing_date" show-overflow-tooltip />
|
||||
<el-table-column label="合同类型" prop="contract_type" show-overflow-tooltip />
|
||||
<el-table-column label="合同金额" prop="contract_amount" show-overflow-tooltip />
|
||||
<!-- <el-table-column label="税率" prop="tax_rate" show-overflow-tooltip /> -->
|
||||
<el-table-column label="洽商金额" prop="negotiation_amount" show-overflow-tooltip />
|
||||
<el-table-column label="不含税金额" prop="excluding_tax_amount" show-overflow-tooltip />
|
||||
<el-table-column label="实际合同金额" prop="reality_contract_amount" show-overflow-tooltip />
|
||||
<el-table-column label="已付款金额" prop="has_pay_amount" show-overflow-tooltip />
|
||||
<el-table-column label="未付款金额" prop="not_pay_amount" show-overflow-tooltip />
|
||||
<el-table-column label="已开票金额" prop="invoice_amount" show-overflow-tooltip />
|
||||
<el-table-column label="未开票金额" prop="not_invoice_amount" show-overflow-tooltip />
|
||||
<el-table-column label="已退款金额" prop="refund_amount" show-overflow-tooltip />
|
||||
<el-table-column label="结算差异" prop="settlement_difference" show-overflow-tooltip />
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
<div style="margin: 10px 0;">
|
||||
<el-pagination v-model:current-page="pager27.page_no" v-model:page-size="pager27.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total26" @size-change="handleSizeChange27" @current-change="handleCurrentChange27" />
|
||||
</div>
|
||||
<div class='tit' style="margin: 20px 0;">分包洽商</div>
|
||||
<div>
|
||||
<el-table :data="tableData28" stripe style="width: 100%">
|
||||
<el-table-column label="洽商编号" prop="negotiation_no" show-overflow-tooltip />
|
||||
<el-table-column label="合同编号" prop="contract_no" show-overflow-tooltip />
|
||||
<el-table-column label="洽商单名称" prop="negotiation_name" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="项目编号" prop="project_code" show-overflow-tooltip />
|
||||
<el-table-column label="供应商" prop="supplier_name" show-overflow-tooltip />
|
||||
<el-table-column label="洽商类别" prop="negotiation_type_text" show-overflow-tooltip />
|
||||
<el-table-column label="签订日期" prop="sign_date" show-overflow-tooltip />
|
||||
<el-table-column label="洽商报价金额" prop="warranty_amount" show-overflow-tooltip />
|
||||
<el-table-column label="洽商质保金额" prop="negotiation_amount" show-overflow-tooltip />
|
||||
</el-table>
|
||||
</div>
|
||||
<div style="margin: 10px 0;">
|
||||
<el-pagination v-model:current-page="pager28.page_no" v-model:page-size="pager28.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total27" @size-change="handleSizeChange28" @current-change="handleCurrentChange28" />
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="收款" name="demo-14">Task</el-tab-pane>
|
||||
<el-tab-pane label="付款" name="demo-15">
|
||||
<div class='tit'>收票记录</div>
|
||||
<div>
|
||||
<el-table :data="tableData22" stripe style="width: 100%">
|
||||
<el-table-column label="开票日期" prop='invoicing_date' width="180" />
|
||||
<el-table-column label="提交人" prop='commitor' width="180" />
|
||||
<el-table-column label="发票类型" prop='invoice_type' />
|
||||
<el-table-column label="发票编号" prop='invoice_no' width="180" />
|
||||
<el-table-column label="发票税率(%)" prop='invoice_tax_rate' width="180" />
|
||||
<el-table-column label="发票金额" prop='invoice_amount' />
|
||||
<el-table-column label="不含税金额" prop='amount_excluding_tax' />
|
||||
<el-table-column label="税额" prop='tax' />
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
<div style="margin: 10px 0;">
|
||||
<el-pagination v-model:current-page="pager22.page_no" v-model:page-size="pager22.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total21" @size-change="handleSizeChange22" @current-change="handleCurrentChange22" />
|
||||
</div>
|
||||
|
||||
|
||||
<div class='tit' style="margin:20px 0">付款计划</div>
|
||||
<div>
|
||||
<el-table :data="tableData23" stripe style="width: 100%">
|
||||
<el-table-column label="计划付款日期" prop='pay_date' width="180" />
|
||||
<el-table-column label="期次" prop='period' width="180" />
|
||||
<el-table-column label="状态" prop='status' />
|
||||
<el-table-column label="金额" prop='amount' />
|
||||
<el-table-column label="已付款" prop='competitor_advantages' />
|
||||
<el-table-column label="未付款" prop='competitor_disadvantages' />
|
||||
<el-table-column label="备注" prop='remark' />
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
<div style="margin: 10px 0;">
|
||||
<el-pagination v-model:current-page="pager23.page_no" v-model:page-size="pager23.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total22" @size-change="handleSizeChange23" @current-change="handleCurrentChange23" />
|
||||
</div>
|
||||
|
||||
|
||||
<div class='tit' style="margin:20px 0">付款记录</div>
|
||||
<div>
|
||||
<el-table :data="tableData24" stripe style="width: 100%">
|
||||
<el-table-column label="付款单号" prop='competitor_name' width="180" />
|
||||
<el-table-column label="合同编号" prop='contract_no' width="180" />
|
||||
<el-table-column label="供应商名称" prop='supplier_name' />
|
||||
<el-table-column label="合同类型" prop='contract_type' />
|
||||
<el-table-column label="期次" prop='period' />
|
||||
<el-table-column label="付款日期" prop='pay_date' />
|
||||
<el-table-column label="付款性质" prop='payment_natrue' />
|
||||
<el-table-column label="付款方式" prop='pay_type' />
|
||||
<el-table-column label="开票状态" prop='' />
|
||||
<el-table-column label="付款金额" prop='amount' />
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
<div style="margin: 10px 0;">
|
||||
<el-pagination v-model:current-page="pager24.page_no" v-model:page-size="pager24.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total23" @size-change="handleSizeChange24" @current-change="handleCurrentChange24" />
|
||||
</div>
|
||||
|
||||
|
||||
<div class='tit' style="margin:20px 0">退款记录</div>
|
||||
<div>
|
||||
<el-table :data="tableData25" stripe style="width: 100%">
|
||||
<el-table-column label="合同编号" prop='contract_no' width="180" />
|
||||
<el-table-column label="合同名称" prop='contract_nanme' width="180" />
|
||||
<el-table-column label="供应商名称" prop='supplier_name' width="180" />
|
||||
<el-table-column label="合同类型" prop='contract_type' width="180" />
|
||||
<el-table-column label="退款日期" prop='refund_date' width="180" />
|
||||
<el-table-column label="退款原因" prop='reason' />
|
||||
<el-table-column label="退款方式" prop='refund_type' />
|
||||
<el-table-column label="退款金额" prop='refund_amount' />
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
<div style="margin: 10px 0;">
|
||||
<el-pagination v-model:current-page="pager25.page_no" v-model:page-size="pager25.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total24" @size-change="handleSizeChange25" @current-change="handleCurrentChange25" />
|
||||
</div>
|
||||
|
||||
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="人力" name="demo-12">
|
||||
|
||||
<el-tabs v-model="active" class="demo-tabs">
|
||||
@ -409,7 +579,6 @@
|
||||
<el-table :data="tableData15" stripe style="width: 100%">
|
||||
<el-table-column label="日记工单号" prop='attendance_code' width="180" />
|
||||
<el-table-column label="日期" prop='attendance_date' width="180" />
|
||||
|
||||
<el-table-column label="出勤人数" prop='competitor_contacts_phone' />
|
||||
<el-table-column label="记工数量 " prop='work_record_num_total' />
|
||||
<el-table-column label="日工资合计" prop="daily_salary_total" show-overflow-tooltip />
|
||||
@ -474,9 +643,14 @@
|
||||
|
||||
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="计划" name="demo-6">Config</el-tab-pane>
|
||||
<el-tab-pane label="材料" name="demo-7">Role</el-tab-pane>
|
||||
|
||||
|
||||
<el-tab-pane label="进度" name="demo-10">Role</el-tab-pane>
|
||||
<el-tab-pane label="任务" name="demo-11">Task</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="机具" name="demo-13">Task</el-tab-pane>
|
||||
<el-tab-pane label="收款" name="demo-14">Task</el-tab-pane>
|
||||
<el-tab-pane label="付款" name="demo-15">Task</el-tab-pane>
|
||||
<el-tab-pane label="费用" name="demo-16">Task</el-tab-pane>
|
||||
<el-tab-pane label="文档" name="demo-17">Task</el-tab-pane>
|
||||
<el-tab-pane label="结算" name="demo-18">Task</el-tab-pane>
|
||||
@ -535,7 +709,17 @@ import { projectsalaryDetailLists } from '@/api/project_salary_detail'
|
||||
import { apiCustomServiceLists } from '@/api/custom_service'
|
||||
import { apiContractLists } from '@/api/contract'
|
||||
import { apiContractNegotiationLists } from '@/api/contract_negotiation'
|
||||
import { subpackagdetailLists } from '@/api/project_subpackage_budget_detail'
|
||||
|
||||
import { paymentplanLists } from '@/api/paymentplan'
|
||||
import { apifinancereceiptLists } from '@/api/receiptrecord'
|
||||
import { paymentapplyLists } from '@/api/paymentrequest'
|
||||
import { apiFinancerefundLists } from '@/api/refundrecord'
|
||||
import { apiProcurementContractLists } from '@/api/procurement_contract'
|
||||
|
||||
import { apiSubcontractingContractLists } from '@/api/subcontracting_contract'
|
||||
|
||||
import { apinegotiationLists } from '@/api/subcontractor'
|
||||
const active = ref('first-1')
|
||||
const activeName = ref('demo-1')
|
||||
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
||||
@ -693,6 +877,31 @@ const pager25 = reactive({
|
||||
page_no: 1,
|
||||
project_id: ""
|
||||
})
|
||||
const pager26 = reactive({
|
||||
page_size: 10,
|
||||
page_no: 1,
|
||||
project_id: ""
|
||||
})
|
||||
const pager27 = reactive({
|
||||
page_size: 10,
|
||||
page_no: 1,
|
||||
project_id: ""
|
||||
})
|
||||
const pager28 = reactive({
|
||||
page_size: 10,
|
||||
page_no: 1,
|
||||
project_id: ""
|
||||
})
|
||||
const pager29 = reactive({
|
||||
page_size: 10,
|
||||
page_no: 1,
|
||||
project_id: ""
|
||||
})
|
||||
const pager30 = reactive({
|
||||
page_size: 10,
|
||||
page_no: 1,
|
||||
project_id: ""
|
||||
})
|
||||
|
||||
|
||||
|
||||
@ -758,6 +967,10 @@ const tableData24 = ref([])
|
||||
const tableData25 = ref([])
|
||||
|
||||
const tableData26 = ref([])
|
||||
const tableData27 = ref([])
|
||||
const tableData28 = ref([])
|
||||
const tableData29 = ref([])
|
||||
const tableData30 = ref([])
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
@ -919,6 +1132,49 @@ const handleSizeChange25 = (val: number) => {
|
||||
customServiceLists()
|
||||
}
|
||||
|
||||
const handleSizeChange26 = (val: number) => {
|
||||
|
||||
pager26.page_size = val
|
||||
|
||||
customServiceLists()
|
||||
}
|
||||
|
||||
|
||||
const handleSizeChange27 = (val: number) => {
|
||||
|
||||
pager27.page_size = val
|
||||
|
||||
customServiceLists()
|
||||
}
|
||||
|
||||
|
||||
const handleSizeChange28 = (val: number) => {
|
||||
|
||||
pager28.page_size = val
|
||||
|
||||
customServiceLists()
|
||||
}
|
||||
|
||||
|
||||
const handleSizeChange29 = (val: number) => {
|
||||
|
||||
pager29.page_size = val
|
||||
|
||||
customServiceLists()
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
const handleSizeChange30 = (val: number) => {
|
||||
|
||||
pager30.page_size = val
|
||||
|
||||
customServiceLists()
|
||||
}
|
||||
|
||||
|
||||
|
||||
//分页
|
||||
const handleCurrentChange1 = (val: number) => {
|
||||
console.log(`current page: ${val}`)
|
||||
@ -1076,6 +1332,50 @@ const handleCurrentChange25 = (val: number) => {
|
||||
|
||||
customServiceLists()
|
||||
}
|
||||
const handleCurrentChange26 = (val: number) => {
|
||||
pager26.page_no = val
|
||||
console.log(`current page: ${val}`)
|
||||
|
||||
customServiceLists()
|
||||
}
|
||||
|
||||
|
||||
const handleCurrentChange27 = (val: number) => {
|
||||
pager27.page_no = val
|
||||
console.log(`current page: ${val}`)
|
||||
|
||||
customServiceLists()
|
||||
}
|
||||
|
||||
|
||||
const handleCurrentChange28 = (val: number) => {
|
||||
pager28.page_no = val
|
||||
console.log(`current page: ${val}`)
|
||||
|
||||
customServiceLists()
|
||||
}
|
||||
|
||||
const handleCurrentChange29 = (val: number) => {
|
||||
pager29.page_no = val
|
||||
console.log(`current page: ${val}`)
|
||||
|
||||
customServiceLists()
|
||||
}
|
||||
|
||||
|
||||
const handleCurrentChange30 = (val: number) => {
|
||||
pager30.page_no = val
|
||||
console.log(`current page: ${val}`)
|
||||
|
||||
customServiceLists()
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1242,14 +1542,72 @@ const contcractNegotiationLists = () => {
|
||||
total19.value = res.count
|
||||
})
|
||||
}
|
||||
//获取付款计划
|
||||
const paymentplanList = (id: any) => {
|
||||
paymentplanLists(pager21).then((res) => {
|
||||
//获取分包预算列表
|
||||
const subpackagList = () => {
|
||||
subpackagdetailLists(pager21).then((res) => {
|
||||
tableData21.value = res.lists
|
||||
total20.value = res.count
|
||||
})
|
||||
}
|
||||
|
||||
// 获取收票记录列表
|
||||
const financereceiptLists = () => {
|
||||
apifinancereceiptLists(pager22).then((res) => {
|
||||
tableData22.value = res.lists
|
||||
total21.value = res.count
|
||||
})
|
||||
}
|
||||
|
||||
// 获取付款计划列表
|
||||
const planLists = () => {
|
||||
paymentplanLists(pager23).then((res) => {
|
||||
tableData23.value = res.lists
|
||||
total22.value = res.count
|
||||
})
|
||||
}
|
||||
|
||||
//获取付款记录
|
||||
const payapplyLists = () => {
|
||||
paymentapplyLists(pager24).then((res) => {
|
||||
tableData24.value = res.lists
|
||||
total22.value = res.count
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//获取退款记录
|
||||
const financerefundLists = () => {
|
||||
apiFinancerefundLists(pager25).then((res) => {
|
||||
tableData25.value = res.lists
|
||||
total24.value = res.count
|
||||
})
|
||||
}
|
||||
|
||||
//获取采购合同
|
||||
|
||||
const procurementContractLists = () => {
|
||||
apiProcurementContractLists(pager26).then((res) => {
|
||||
tableData26.value = res.lists
|
||||
total25.value = res.count
|
||||
})
|
||||
}
|
||||
//获取分包合同
|
||||
const subcontractingContractLists = () => {
|
||||
apiSubcontractingContractLists(pager27).then((res) => {
|
||||
tableData27.value = res.lists
|
||||
total26.value = res.count
|
||||
})
|
||||
}
|
||||
|
||||
//获取分包合同洽商
|
||||
const negotiationLists = () => {
|
||||
apinegotiationLists(pager28).then((res) => {
|
||||
tableData28.value = res.lists
|
||||
total27.value = res.count
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
@ -1284,6 +1642,17 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
pager18.project_id = data.id
|
||||
pager19.project_id = data.id
|
||||
pager20.project_id = data.id
|
||||
pager21.project_id = data.id
|
||||
pager22.project_id = data.id
|
||||
pager23.project_id = data.id
|
||||
pager24.project_id = data.id
|
||||
pager20.project_id = data.id
|
||||
pager25.project_id = data.id
|
||||
pager26.project_id = data.id
|
||||
pager27.project_id = data.id
|
||||
pager28.project_id = data.id
|
||||
pager29.project_id = data.id
|
||||
pager30.project_id = data.id
|
||||
Object.assign(formData, data)
|
||||
|
||||
if (data.annex && data.annex.length > 0) {
|
||||
@ -1315,6 +1684,14 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
customServiceLists()
|
||||
contractLists()
|
||||
contcractNegotiationLists()
|
||||
subpackagList()
|
||||
financereceiptLists()
|
||||
planLists()
|
||||
payapplyLists()
|
||||
financerefundLists()
|
||||
procurementContractLists()
|
||||
subcontractingContractLists()
|
||||
negotiationLists()
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
|
@ -4,55 +4,55 @@
|
||||
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules" inline>
|
||||
<div style="display: flex; flex-direction: row-reverse; justify-content: flex-start;margin-bottom: 30px;">
|
||||
|
||||
<el-select class="w-[180px]" v-model="formData.dept_id" clearable placeholder="请选择部门">
|
||||
<el-option v-for="(item, index) in list2" :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
<el-select class="w-[180px]" v-model="formData.org_id" clearable placeholder="请选择组织" @change="deptrmt">
|
||||
<el-option v-for="(item, index) in list1" :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</div>
|
||||
<el-select class="w-[180px]" v-model="formData.dept_id" clearable placeholder="请选择部门">
|
||||
<el-option v-for="(item, index) in list2" :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
<el-select class="w-[180px]" v-model="formData.org_id" clearable placeholder="请选择组织" @change="deptrmt">
|
||||
<el-option v-for="(item, index) in list1" :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</div>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目名称" prop="project_id" @click="showDialog = true" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="project_name" clearable placeholder="请输入项目名称" />
|
||||
<el-input v-model="project_name" readonly clearable placeholder="请输入项目名称" />
|
||||
</el-form-item> </el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目编码" prop="project_id">
|
||||
<el-input v-model="project_code" clearable placeholder="请输入项目编码" />
|
||||
</el-form-item>
|
||||
<el-input v-model="project_code" disabled clearable placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<div style=" display: flex;justify-content: flex-end;margin-bottom: 30px;">
|
||||
<el-button @click="showDialog1 = true" type="primary" plain>选择材料</el-button>
|
||||
<el-button @click="showDialog1 = true" type="primary" plain>下载导入表</el-button>
|
||||
<el-button @click="showDialog1 = true" type="primary" plain>导入预算</el-button>
|
||||
<el-button @click="showDialog1 = true" type="primary" plain>清空</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
<div style=" display: flex;justify-content: flex-end;margin-bottom: 30px;">
|
||||
<el-button @click="showDialog1 = true" type="primary" plain>选择材料</el-button>
|
||||
<el-button @click="showDialog1 = true" type="primary" plain>下载导入表</el-button>
|
||||
<el-button @click="showDialog1 = true" type="primary" plain>导入预算</el-button>
|
||||
<el-button @click="showDialog1 = true" type="primary" plain>清空</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<div style="margin-bottom: 30px;">材料预算清单</div>
|
||||
<div style="margin-bottom: 30px;">
|
||||
<el-table :data="tableData">
|
||||
<el-table-column label="序号" type="index">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="材料名称" >
|
||||
|
||||
<el-table-column label="材料名称">
|
||||
<template #default="{ row }"> <el-input v-model="row.name" /> </template></el-table-column>
|
||||
<el-table-column label="材料编码" >
|
||||
<el-table-column label="材料编码">
|
||||
<template #default="{ row }"> <el-input v-model="row.code" /> </template></el-table-column>
|
||||
|
||||
<el-table-column label="规格型号" >
|
||||
<el-table-column label="规格型号">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.specs" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="品牌" >
|
||||
<el-table-column label="品牌">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.brand" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="参数说明" >
|
||||
<el-table-column label="参数说明">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.parameter_description" />
|
||||
</template>
|
||||
@ -79,9 +79,9 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
|
||||
<el-table-column label="管理" prop="amount_including_tax">
|
||||
<template #default="{ row }">
|
||||
<template #default="{ row }">
|
||||
<!-- <el-button @click="handleAdd(row)">+</el-button> -->
|
||||
<el-button @click="handleDelete(row)">删除</el-button>
|
||||
</template>
|
||||
@ -89,27 +89,27 @@
|
||||
</el-table>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="附件" prop="field127">
|
||||
<el-upload accept="doc, docx, xls, xlsx, ppt, pptx, pdf, txt, zip, rar, tar, jpg, png, gif, jpeg, webp, wmv, avi, mpg, mpeg, 3gp, mov, mp4, flv, f4v, rmvb, mkv" class="upload-demo" :show-file-list="false" aria-hidden="true" :headers="{ Token: userStore.token }" :action="base_url + '/upload/file'" :on-success="handleAvatarSuccess_four" ref="upload">
|
||||
<el-button type="primary">
|
||||
上传
|
||||
</el-button>
|
||||
</el-upload>
|
||||
<div>
|
||||
<div v-for="(item, index) in formDataannex" style="margin-left: 5px;display: block;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri" target="_blank">{{ item.name }}</a>
|
||||
<span style="cursor: pointer;margin-left: 5px;" @click="delFileFn(index)">x</span>
|
||||
</div>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="附件" prop="field127">
|
||||
<el-upload accept="doc, docx, xls, xlsx, ppt, pptx, pdf, txt, zip, rar, tar, jpg, png, gif, jpeg, webp, wmv, avi, mpg, mpeg, 3gp, mov, mp4, flv, f4v, rmvb, mkv" class="upload-demo" :show-file-list="false" aria-hidden="true" :headers="{ Token: userStore.token }" :action="base_url + '/upload/file'" :on-success="handleAvatarSuccess_four" ref="upload">
|
||||
<el-button type="primary">
|
||||
上传
|
||||
</el-button>
|
||||
</el-upload>
|
||||
<div>
|
||||
<div v-for="(item, index) in formDataannex" style="margin-left: 5px;display: block;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri" target="_blank">{{ item.name }}</a>
|
||||
<span style="cursor: pointer;margin-left: 5px;" @click="delFileFn(index)">x</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</popup>
|
||||
@ -149,7 +149,7 @@ const project_name = ref('')
|
||||
const project_code = ref('')
|
||||
const person_name = ref('')
|
||||
const idcard = ref('')
|
||||
const tableData=ref([])
|
||||
const tableData = ref([])
|
||||
const list1 = reactive([])
|
||||
const list2 = reactive([])
|
||||
import { deptAll } from '@/api/org/department'
|
||||
@ -165,7 +165,7 @@ const formDataannex = reactive([])
|
||||
//获取值
|
||||
const customEvent = (e) => {
|
||||
formData.project_id = e.id
|
||||
project_name.value = e.project_nam
|
||||
project_name.value = e.name
|
||||
project_code.value = e.project_code
|
||||
showDialog.value = false
|
||||
|
||||
@ -175,17 +175,17 @@ const customEvent1 = (e) => {
|
||||
// idcard.value = e.idcard
|
||||
// person_name.value = e.name
|
||||
tableData.value.push({
|
||||
"material_id":e.id,
|
||||
"name":e.name,
|
||||
"code":e.code,
|
||||
'parameter_description':e.parameter_description,
|
||||
"brand":e.brand,
|
||||
"unit":e.unit,
|
||||
"specs":e.specs,
|
||||
"num":e.num,
|
||||
"price":e.price,
|
||||
"remark":e.remark
|
||||
})
|
||||
"material_id": e.id,
|
||||
"name": e.name,
|
||||
"code": e.code,
|
||||
'parameter_description': e.parameter_description,
|
||||
"brand": e.brand,
|
||||
"unit": e.unit,
|
||||
"specs": e.specs,
|
||||
"num": e.num,
|
||||
"price": e.price,
|
||||
"remark": e.remark
|
||||
})
|
||||
showDialog1.value = false
|
||||
|
||||
}
|
||||
@ -243,23 +243,23 @@ const getlist1 = (id: any) => {
|
||||
}
|
||||
//获取预算明细列表
|
||||
const budgetDetailLists = (id) => {
|
||||
MaterialbudgetDetailLists({ 'page_no': 1,'page_size':20,material_budget_id:id }).then((res) => {
|
||||
|
||||
tableData.value=res.lists.map((item:any)=>({
|
||||
"id":item.id,
|
||||
"material_id":item.material_id,
|
||||
"name":item.material_name,
|
||||
"code":item.material_code,
|
||||
'parameter_description':item.material_parameter_description,
|
||||
"brand":item.material_brand,
|
||||
"unit":item.material_unit,
|
||||
"specs":item.material_specs,
|
||||
"num":item.num,
|
||||
"price":item.price,
|
||||
"remark":item.remark
|
||||
MaterialbudgetDetailLists({ 'page_no': 1, 'page_size': 20, material_budget_id: id }).then((res) => {
|
||||
|
||||
tableData.value = res.lists.map((item: any) => ({
|
||||
"id": item.id,
|
||||
"material_id": item.material_id,
|
||||
"name": item.material_name,
|
||||
"code": item.material_code,
|
||||
'parameter_description': item.material_parameter_description,
|
||||
"brand": item.material_brand,
|
||||
"unit": item.material_unit,
|
||||
"specs": item.material_specs,
|
||||
"num": item.num,
|
||||
"price": item.price,
|
||||
"remark": item.remark
|
||||
}))
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -317,7 +317,7 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
}
|
||||
project_name.value = data.project_name
|
||||
project_code.value = data.project_code
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -334,13 +334,13 @@ const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.annex = JSON.stringify(formDataannex.map((item: any) => item.uri))
|
||||
}
|
||||
if(tableData.value.length>0){
|
||||
formData.material_budget_detail=JSON.stringify(tableData.value.map((item:any)=>({
|
||||
'id':item.id,
|
||||
"material_id":item.material_id,
|
||||
"num":item.num,
|
||||
"price":item.price,
|
||||
"remark":item.remark
|
||||
if (tableData.value.length > 0) {
|
||||
formData.material_budget_detail = JSON.stringify(tableData.value.map((item: any) => ({
|
||||
'id': item.id,
|
||||
"material_id": item.material_id,
|
||||
"num": item.num,
|
||||
"price": item.price,
|
||||
"remark": item.remark
|
||||
})))
|
||||
}
|
||||
await formRef.value?.validate()
|
||||
|
170
src/views/project_subpackage_budget/detail.vue
Normal file
170
src/views/project_subpackage_budget/detail.vue
Normal file
@ -0,0 +1,170 @@
|
||||
|
||||
<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.subpackage_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" 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="序号" 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="unit" 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 { subpackagdetailLists } from '@/api/project_subpackage_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: {
|
||||
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) => {
|
||||
subpackagdetailLists({ 'page_no': pager1.page_no, 'page_size': pager1.page_size, subpackage_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>
|
363
src/views/project_subpackage_budget/edit.vue
Normal file
363
src/views/project_subpackage_budget/edit.vue
Normal file
@ -0,0 +1,363 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules" inline>
|
||||
<div style="display: flex; flex-direction: row-reverse; justify-content: flex-start;margin-bottom: 30px;">
|
||||
|
||||
<el-select class="w-[180px]" v-model="formData.dept_id" clearable placeholder="请选择部门">
|
||||
<el-option v-for="(item, index) in list2" :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
<el-select class="w-[180px]" v-model="formData.org_id" clearable placeholder="请选择组织" @change="deptrmt">
|
||||
<el-option v-for="(item, index) in list1" :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</div>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目名称" prop="project_id" @click="showDialog = true" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="project_name" readonly clearable placeholder="请输入项目名称" />
|
||||
</el-form-item> </el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目编码" prop="project_id">
|
||||
<el-input v-model="project_code" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<div style=" display: flex;justify-content: flex-end;margin-bottom: 30px;">
|
||||
<el-button type="primary" plain>下载导入表</el-button>
|
||||
<el-button type="primary" plain>下载导入表</el-button>
|
||||
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<div style="margin-bottom: 30px;">分包预算清单</div>
|
||||
<div style="margin-bottom: 30px;">
|
||||
<el-table :data="tableData">
|
||||
<el-table-column label="序号">
|
||||
<template #default="{ row }">
|
||||
<el-button @click="handleAdd(row)">+</el-button>
|
||||
<el-button @click="handleDelete(row)">-</el-button> </template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="工作类型">
|
||||
<template #default="{ row }"> <el-input v-model="row.work_type" /> </template></el-table-column>
|
||||
<el-table-column label="工作内容">
|
||||
<template #default="{ row }"> <el-input v-model="row.work_content" /> </template></el-table-column>
|
||||
|
||||
<el-table-column label="项目特征">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.project_features" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="单位">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.unit" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工作量">
|
||||
<template #default="{ row, $index }">
|
||||
<el-input v-model="row.num" @input="subtractji1(row, $index)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单价" prop="price">
|
||||
<template #default="{ row, $index }">
|
||||
<el-input v-model="row.price" @input="subtractji1(row, $index)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="金额" prop="amount">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.amount" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="备注" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="附件" prop="field127">
|
||||
<el-upload accept="doc, docx, xls, xlsx, ppt, pptx, pdf, txt, zip, rar, tar, jpg, png, gif, jpeg, webp, wmv, avi, mpg, mpeg, 3gp, mov, mp4, flv, f4v, rmvb, mkv" class="upload-demo" :show-file-list="false" aria-hidden="true" :headers="{ Token: userStore.token }" :action="base_url + '/upload/file'" :on-success="handleAvatarSuccess_four" ref="upload">
|
||||
<el-button type="primary">
|
||||
上传
|
||||
</el-button>
|
||||
</el-upload>
|
||||
<div>
|
||||
<div v-for="(item, index) in formDataannex" style="margin-left: 5px;display: block;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri" target="_blank">{{ item.name }}</a>
|
||||
<span style="cursor: pointer;margin-left: 5px;" @click="delFileFn(index)">x</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</popup>
|
||||
<el-dialog v-model="showDialog" title="选择项目" width="70%">
|
||||
<projectDialog @customEvent="customEvent"></projectDialog>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="showDialog1" title="选择产品" width="70%">
|
||||
<prodctTable @customEvent="customEvent1" :project_id='formData.project_id'></prodctTable>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="procurementContractEdit">
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import projectDialog from '@/components/project/index.vue'
|
||||
import { subpackagdetailLists } from '@/api/project_subpackage_budget_detail'
|
||||
|
||||
import prodctTable from '@/components/product/index.vue'
|
||||
import { subpackagebudgetAdd, subpackagebudgetEdit, subpackagebudgetDetail } from '@/api/project_subpackage_budget'
|
||||
import customDialog from '@/components/project_personnel/index.vue'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
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 mode = ref('add')
|
||||
import feedback from '@/utils/feedback'
|
||||
const showDialog = ref(false)
|
||||
const showDialog1 = ref(false)
|
||||
const project_name = ref('')
|
||||
const project_code = ref('')
|
||||
const person_name = ref('')
|
||||
const idcard = ref('')
|
||||
const tableData = ref([{}])
|
||||
const list1 = reactive([])
|
||||
const list2 = reactive([])
|
||||
import { deptAll } from '@/api/org/department'
|
||||
import { getAll } from '@/api/org/organization'
|
||||
import configs from "@/config"
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
const base_url = configs.baseUrl + configs.urlPrefix
|
||||
const userStore = useUserStore();
|
||||
const formDataannex = reactive([])
|
||||
|
||||
|
||||
|
||||
//获取值
|
||||
const customEvent = (e) => {
|
||||
formData.project_id = e.id
|
||||
project_name.value = e.name
|
||||
project_code.value = e.project_code
|
||||
showDialog.value = false
|
||||
|
||||
}
|
||||
const customEvent1 = (e) => {
|
||||
// formData.project_person_id = e.id
|
||||
// idcard.value = e.idcard
|
||||
// person_name.value = e.name
|
||||
|
||||
showDialog1.value = false
|
||||
|
||||
}
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑分包预算' : '新增分包预算'
|
||||
})
|
||||
// 上传文件
|
||||
const handleAvatarSuccess_four = (
|
||||
response,
|
||||
uploadFile
|
||||
) => {
|
||||
if (response.code == 0) {
|
||||
ElMessage.error(response.msg);
|
||||
return;
|
||||
}
|
||||
formDataannex.push(
|
||||
{ uri: response.data.uri, name: response.data.name }
|
||||
|
||||
|
||||
);
|
||||
};
|
||||
|
||||
// 删除上传的文件
|
||||
const delFileFn = (index: number) => {
|
||||
formDataannex.splice(index, 1)
|
||||
}
|
||||
|
||||
//计算
|
||||
const subtractji1 = (row: any, index: any) => {
|
||||
const num = Number(row.num) || 0;
|
||||
const price = Number(row.price) || 0;
|
||||
row.amount = num * price
|
||||
}
|
||||
//获取所有组织
|
||||
const getlist = () => {
|
||||
getAll().then((res) => {
|
||||
Object.assign(list1, res)
|
||||
if (res.length > 0 && !formData.org_id) {
|
||||
formData.org_id = res[0].id
|
||||
deptAll({ 'org_id': res[0].id }).then((res) => {
|
||||
if (res.length > 0) {
|
||||
Object.assign(list2, res)
|
||||
formData.dept_id = res[0].id
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
//获取部门
|
||||
const deptrmt = (e: any) => {
|
||||
formData.dept_id = ''
|
||||
getlist1(e)
|
||||
|
||||
}
|
||||
//获取所有部门
|
||||
const getlist1 = (id: any) => {
|
||||
deptAll({ 'org_id': id }).then((res) => {
|
||||
list2.splice(0, list2.length, ...res)
|
||||
})
|
||||
}
|
||||
//获取分包预算列表
|
||||
const budgetDetailLists = (id: any) => {
|
||||
subpackagdetailLists({ 'page_no': 1, 'page_size': 20, subpackage_budget_id: id }).then((res) => {
|
||||
|
||||
tableData.value = res.lists.map((item: any) => ({
|
||||
"id": item.id,
|
||||
"work_type": item.work_type,
|
||||
"work_content": item.work_content,
|
||||
"project_features": item.project_features,
|
||||
"unit": item.unit,
|
||||
"num": item.num,
|
||||
"amount": item.amount,
|
||||
"price": item.price,
|
||||
"remark": item.remark
|
||||
}))
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
dept_id: '',
|
||||
org_id: '',
|
||||
project_id: '',
|
||||
subpackage_budget_detail: '',
|
||||
remark: '',
|
||||
annex: '',
|
||||
})
|
||||
const handleAdd = (row: any) => {
|
||||
// 在 row 后面插入一行数据
|
||||
const index = tableData.value.indexOf(row);
|
||||
tableData.value.splice(index + 1, 0, {});
|
||||
};
|
||||
|
||||
const handleDelete = (row: any) => {
|
||||
// 删除 row
|
||||
const index = tableData.value.indexOf(row);
|
||||
tableData.value.splice(index, 1);
|
||||
};
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
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)
|
||||
}
|
||||
budgetDetailLists(data.id)
|
||||
if (data.dept_id) {
|
||||
getlist1(data.org_id)
|
||||
}
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
project_name.value = data.project_name
|
||||
project_code.value = data.project_code
|
||||
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await subpackagebudgetDetail({
|
||||
id: row.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.annex = JSON.stringify(formDataannex.map((item: any) => item.uri))
|
||||
}
|
||||
if (tableData.value.length > 0) {
|
||||
formData.subpackage_budget_detail = JSON.stringify(tableData.value.map((item: any) => ({
|
||||
'id': item.id,
|
||||
"work_type": item.work_type,
|
||||
"work_content": item.work_content,
|
||||
"project_features": item.project_features,
|
||||
"unit": item.unit,
|
||||
"num": item.num,
|
||||
"price": item.price,
|
||||
"remark": item.remark
|
||||
})))
|
||||
}
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
? await subpackagebudgetEdit(data)
|
||||
: await subpackagebudgetAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = 'add') => {
|
||||
mode.value = type
|
||||
popupRef.value?.open()
|
||||
getlist()
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
145
src/views/project_subpackage_budget/index.vue
Normal file
145
src/views/project_subpackage_budget/index.vue
Normal file
@ -0,0 +1,145 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- <el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
|
||||
|
||||
<el-form-item label="类型" prop="budget_type">
|
||||
<el-select class="w-[280px]" v-model="queryParams.budget_type" clearable placeholder="请选择类型">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option v-for="(item, index) in dictData.budget_type" :key="index" :label="item.name" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card> -->
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-button v-perms="['project.project/add']" type="primary" @click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button v-perms="['project.project/delete']" :disabled="!selectData.length" @click="handleDelete(selectData)">
|
||||
删除
|
||||
</el-button>
|
||||
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="序号" type="index" width="55" />
|
||||
<el-table-column label="预算单号" prop="subpackage_budget_code" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
|
||||
<el-table-column label="预算总工作量" prop="total_num" show-overflow-tooltip />
|
||||
<el-table-column label="剩余预算工作量" prop="residue_num" show-overflow-tooltip />
|
||||
<el-table-column label="预算总金额" prop="total_amount" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
||||
|
||||
|
||||
|
||||
<el-table-column label="操作" width="160" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['project.project/edit']" type="primary" link @click="handleEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-perms="['project.project/delete']" type="danger" link @click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button v-perms="['project.project/detail']" link @click="handledetail(row)">
|
||||
详情
|
||||
</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<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" />
|
||||
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="projectLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { subpackagebudgetLists, subpackagebudgetDelete, subpackagebudgetDetail } from '@/api/project_subpackage_budget'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import { getAllProjectTypes } from '@/api/projecttype'
|
||||
const protype = reactive([])
|
||||
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({
|
||||
|
||||
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id)
|
||||
}
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData('labor_contract_status,labor_contract_type,labor_contract_name')
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: subpackagebudgetLists,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
// 添加
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('add')
|
||||
}
|
||||
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
console.log(data.id)
|
||||
let res = await subpackagebudgetDetail({ id: data.id })
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
await subpackagebudgetDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
const handledetail = async (data: any) => {
|
||||
let res = await subpackagebudgetDetail({ id: data.id })
|
||||
showDtail.value = true
|
||||
await nextTick()
|
||||
detailRef.value?.open()
|
||||
detailRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
|
||||
getLists()
|
||||
</script>
|
||||
|
139
src/views/project_subpackage_budget_detail/detail.vue
Normal file
139
src/views/project_subpackage_budget_detail/detail.vue
Normal file
@ -0,0 +1,139 @@
|
||||
|
||||
<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.material_budget_code }}</el-descriptions-item>
|
||||
<el-descriptions-item label="工作类型" label-align="left" align="left" label-class-name="my-label"> {{ formData.work_type
|
||||
}}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="工作内容" label-align="left" align="left" label-class-name="my-label"> {{ formData.work_content
|
||||
}}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="项目特征" label-align="left" align="left" label-class-name="my-label"> {{ formData.project_features
|
||||
}}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="单位" label-align="left" align="left" label-class-name="my-label"> {{ formData.unit
|
||||
}}</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="工作量" label-align="left" align="left" label-class-name="my-label"> {{ formData.num
|
||||
}}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="单价" label-align="left" align="left" label-class-name="my-label"> {{ formData.price
|
||||
}}</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="剩余预算工作量" label-align="left" align="left" label-class-name="my-label"> {{ formData.residue_num
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="已分包工作量" label-align="left" align="left" label-class-name="my-label"> {{ formData.has_subcontract_num
|
||||
}}</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="备注" label-align="left" align="left" label-class-name="my-label"> {{ formData.remark
|
||||
}}</el-descriptions-item>
|
||||
|
||||
|
||||
|
||||
</el-descriptions>
|
||||
|
||||
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="customdetail">
|
||||
|
||||
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: {
|
||||
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 datas = reactive({
|
||||
provinceOptions: [],
|
||||
cityOptions: [],
|
||||
areaOptions: [],
|
||||
});
|
||||
|
||||
const tableData = ref([])
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
|
||||
})
|
||||
|
||||
//条数
|
||||
|
||||
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
Object.assign(formData, data)
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
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>
|
187
src/views/project_subpackage_budget_detail/edit.vue
Normal file
187
src/views/project_subpackage_budget_detail/edit.vue
Normal file
@ -0,0 +1,187 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules" inline>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目名称" prop="subpackage_budget_id" @click="showDialog = true" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="project_name" readonly clearable placeholder="请输入项目名称" />
|
||||
</el-form-item> </el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目编码" prop="subpackage_budget_id">
|
||||
<el-input v-model="project_code" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="工作类型" prop="work_type">
|
||||
<el-input v-model="formData.work_type" clearable placeholder="请输入工作类型" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="工作内容" prop="work_content">
|
||||
<el-input v-model="formData.work_content" clearable placeholder="请输入工作内容" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目特征" prop="project_features">
|
||||
<el-input v-model="formData.project_features" clearable placeholder="请输入项目特征" />
|
||||
</el-form-item>
|
||||
</el-col> <el-col :span="8">
|
||||
<el-form-item label="单位" prop="unit">
|
||||
<el-input v-model="formData.unit" clearable placeholder="请输入单位" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="工作量" prop="num">
|
||||
<el-input v-model="formData.num" clearable placeholder="请输入工作量" />
|
||||
</el-form-item>
|
||||
</el-col> <el-col :span="8">
|
||||
<el-form-item label="单价" prop="price">
|
||||
<el-input v-model="formData.price" clearable placeholder="请输入单价" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</el-form>
|
||||
</popup>
|
||||
<el-dialog v-model="showDialog" title="选择分包预算" width="70%">
|
||||
<projectDialog @customEvent="customEvent"></projectDialog>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="procurementContractEdit">
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import projectDialog from '@/components/subpackage_budget/index.vue'
|
||||
import { MaterialbudgetDetailLists } from '@/api/project_material_budget_detail'
|
||||
import prodctTable from '@/components/product/index.vue'
|
||||
import { subpackagdetailAdd, subpackagdetailEdit, subpackagdetailDetail } from '@/api/project_subpackage_budget_detail'
|
||||
import customDialog from '@/components/project_personnel/index.vue'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
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 mode = ref('add')
|
||||
import feedback from '@/utils/feedback'
|
||||
const showDialog = ref(false)
|
||||
const showDialog1 = ref(false)
|
||||
const project_name = ref('')
|
||||
const project_code = ref('')
|
||||
const person_name = ref('')
|
||||
const idcard = ref('')
|
||||
const tableData = ref([{}])
|
||||
|
||||
import configs from "@/config"
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
const base_url = configs.baseUrl + configs.urlPrefix
|
||||
const userStore = useUserStore();
|
||||
const formDataannex = reactive([])
|
||||
|
||||
|
||||
|
||||
//获取值
|
||||
const customEvent = (e) => {
|
||||
formData.subpackage_budget_id = e.id
|
||||
project_name.value = e.project_name
|
||||
project_code.value = e.project_code
|
||||
showDialog.value = false
|
||||
|
||||
}
|
||||
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑分包预算明细' : '新增分包预算明细'
|
||||
})
|
||||
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
subpackage_budget_id: '',
|
||||
work_type: '',
|
||||
work_content: '',
|
||||
project_features: '',
|
||||
unit: '',
|
||||
num: '',
|
||||
price: '',
|
||||
remark: 3
|
||||
})
|
||||
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
|
||||
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
project_name.value = data.project_name
|
||||
project_code.value = data.project_code
|
||||
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await subpackagdetailDetail({
|
||||
id: row.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
? await subpackagdetailEdit(data)
|
||||
: await subpackagdetailAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = 'add') => {
|
||||
mode.value = type
|
||||
popupRef.value?.open()
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
151
src/views/project_subpackage_budget_detail/index.vue
Normal file
151
src/views/project_subpackage_budget_detail/index.vue
Normal file
@ -0,0 +1,151 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- <el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
|
||||
|
||||
<el-form-item label="类型" prop="budget_type">
|
||||
<el-select class="w-[280px]" v-model="queryParams.budget_type" clearable placeholder="请选择类型">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option v-for="(item, index) in dictData.budget_type" :key="index" :label="item.name" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card> -->
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-button v-perms="['project.project/add']" type="primary" @click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button v-perms="['project.project/delete']" :disabled="!selectData.length" @click="handleDelete(selectData)">
|
||||
删除
|
||||
</el-button>
|
||||
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="序号" type="index" width="55" />
|
||||
<el-table-column label="预算单号" prop="subpackage_budget_code" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="项目编码" prop="project_code" 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="unit" show-overflow-tooltip />
|
||||
<!-- <el-table-column label="首次预算工作量" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column label="预算调整工作量" prop="remark" 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-column label="已分包工作量" prop="has_subcontract_num" show-overflow-tooltip />
|
||||
<el-table-column label="剩余预算工作量" prop="residue_num" show-overflow-tooltip />
|
||||
|
||||
<el-table-column label="操作" width="160" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['project.project/edit']" type="primary" link @click="handleEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-perms="['project.project/delete']" type="danger" link @click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button v-perms="['project.project/detail']" link @click="handledetail(row)">
|
||||
详情
|
||||
</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<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" />
|
||||
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="projectLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { subpackagdetailLists, subpackagdetailDelete, subpackagdetailDetail } from '@/api/project_subpackage_budget_detail'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import { getAllProjectTypes } from '@/api/projecttype'
|
||||
const protype = reactive([])
|
||||
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({
|
||||
|
||||
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id)
|
||||
}
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData('labor_contract_status,labor_contract_type,labor_contract_name')
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: subpackagdetailLists,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
// 添加
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('add')
|
||||
}
|
||||
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
console.log(data.id)
|
||||
let res = await subpackagdetailDetail({ id: data.id })
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
await subpackagdetailDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
const handledetail = async (data: any) => {
|
||||
let res = await subpackagdetailDetail({ id: data.id })
|
||||
showDtail.value = true
|
||||
await nextTick()
|
||||
detailRef.value?.open()
|
||||
detailRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
|
||||
getLists()
|
||||
</script>
|
||||
|
@ -3,74 +3,158 @@
|
||||
<div class="detail-popup">
|
||||
<popup ref="popupRef" title="分包合同详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="120px">
|
||||
<el-card class="mb-2">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目名称">
|
||||
{{ formData.contract_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目编码">
|
||||
{{ formData.contract_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="合同名称">
|
||||
{{ formData.contract_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="合同编号">
|
||||
{{ formData.contract_code }}
|
||||
</el-form-item>
|
||||
</el-col> <el-col :span="12">
|
||||
<el-form-item label="合同类型">
|
||||
<dict-value :options="dictData.contract_type" :value="formData.contract_type" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||
<el-tab-pane label="基本信息" name="demo-tabs-1">
|
||||
<el-descriptions :column="2" border>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="付款方式">
|
||||
<dict-value :options="dictData.pay_type" :value="formData.pay_type" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="账期">
|
||||
<dict-value :options="dictData.account_period" :value="formData.account_period" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="不含税金额">
|
||||
{{ formData.amount_daxie }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="含税金额">
|
||||
{{ formData.labor_costs }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="金额大写">
|
||||
{{ formData.amount_daxie }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="质保金比例">
|
||||
<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.contract_name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="合同编号" label-align="left" align="left" label-class-name="my-label">{{ formData.contract_no }}</el-descriptions-item>
|
||||
<el-descriptions-item label="供应商编码" label-align="left" align="left" label-class-name="my-label">{{ formData.supplier_code }}</el-descriptions-item>
|
||||
<el-descriptions-item label="供应商名称" label-align="left" align="left" label-class-name="my-label">{{ formData.supplier_name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="合同类型" label-align="left" align="left" label-class-name="my-label">
|
||||
{{ formData.contract_type_text }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="签订日期" label-align="left" align="left" label-class-name="my-label">
|
||||
{{ formData.signing_date }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="付款方式" label-align="left" align="left" label-class-name="my-label">
|
||||
{{ formData.pay_type_text }}
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="账期" label-align="left" align="left" label-class-name="my-label">
|
||||
{{ formData.account_period_text }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="合同金额" label-align="left" align="left" label-class-name="my-label">
|
||||
{{ formData.contract_amount }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="税率" label-align="left" align="left" label-class-name="my-label">
|
||||
{{ formData.contract_type_text }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="不含税金额" label-align="left" align="left" label-class-name="my-label">
|
||||
{{ formData.amount_excluding_tax }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="质保金比例(%)" label-align="left" align="left" label-class-name="my-label">
|
||||
{{ formData.retention_money_rate }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="质保金">
|
||||
{{ formData.retention_mone }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="质保金" label-align="left" align="left" label-class-name="my-label">
|
||||
{{ formData.retention_money }}
|
||||
</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="formDataannex.length > 0">
|
||||
<div v-for="(item, index) in formDataannex" 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>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="采购明细" name="demo-tabs-2">
|
||||
<div>
|
||||
<el-table :data="tableData" stripe style="width: 100%">
|
||||
<el-table-column label="采购申请单号" prop='material_purchase_request_code' width="180" />
|
||||
<el-table-column label="材料名称" prop='material_name' width="180" />
|
||||
<el-table-column label="材料编码" prop='material_code' />
|
||||
<el-table-column label="规格型号" prop='material_specs' />
|
||||
<el-table-column label="品牌" prop='material_brand' />
|
||||
<el-table-column label="参数说明" prop='material_parameter_description' width="280" />
|
||||
<el-table-column label="单位" prop='material_unit' />
|
||||
<el-table-column label="数量" prop='num' />
|
||||
<el-table-column label="合税单价" prop='price' />
|
||||
<el-table-column label="不含税金额" prop='amount_excluding_tax' />
|
||||
<el-table-column label="含税金额" prop='amount_including_tax' />
|
||||
<el-table-column label="已入库数量" prop="has_storage_num" show-overflow-tooltip />
|
||||
<el-table-column label="未入库数量" prop="not_storage_num" 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>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="收票记录" name="demo-tabs-3">
|
||||
<div>
|
||||
<el-table :data="tableData1" stripe style="width: 100%">
|
||||
<el-table-column label="开票日期" prop='invoicing_date' width="180" />
|
||||
<el-table-column label="提交人" prop='commitor' width="180" />
|
||||
<el-table-column label="发票类型" prop='invoice_type' />
|
||||
<el-table-column label="发票编号" prop='invoice_no' width="180" />
|
||||
<el-table-column label="发票税率(%)" prop='invoice_tax_rate' width="180" />
|
||||
<el-table-column label="发票金额" prop='invoice_amount' />
|
||||
<el-table-column label="不含税金额" prop='amount_excluding_tax' />
|
||||
<el-table-column label="税额" prop='tax' />
|
||||
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-table>
|
||||
</div>
|
||||
<div style="margin: 10px 0;">
|
||||
<el-pagination v-model:current-page="pager2.page_no" v-model:page-size="pager2.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total1" @size-change="handleSizeChange2" @current-change="handleCurrentChange2" />
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="付款计划" name="demo-tabs-4">
|
||||
<div>
|
||||
<el-table :data="tableData2" stripe style="width: 100%">
|
||||
<el-table-column label="计划付款日期" prop='pay_date' width="180" />
|
||||
<el-table-column label="期次" prop='period' width="180" />
|
||||
<el-table-column label="状态" prop='status' />
|
||||
<el-table-column label="金额" prop='amount' />
|
||||
<el-table-column label="已付款" prop='competitor_advantages' />
|
||||
<el-table-column label="未付款" prop='competitor_disadvantages' />
|
||||
<el-table-column label="备注" prop='remark' />
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
<div style="margin: 10px 0;">
|
||||
<el-pagination v-model:current-page="pager3.page_no" v-model:page-size="pager3.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total2" @size-change="handleSizeChange3" @current-change="handleCurrentChange3" />
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="付款记录" name="demo-tabs-5">
|
||||
<div>
|
||||
<el-table :data="tableData3" stripe style="width: 100%">
|
||||
<el-table-column label="付款单号" prop='competitor_name' width="180" />
|
||||
<el-table-column label="期次" prop='competitor_contacts' width="180" />
|
||||
<el-table-column label="付款日期" prop='competitor_contacts_phone' />
|
||||
<el-table-column label="申请人" prop='competitive_power' />
|
||||
<el-table-column label="开票状态" prop='competitor_advantages' />
|
||||
<el-table-column label="款项说明" prop='competitor_disadvantages' />
|
||||
<el-table-column label="付款方式" prop='competitor_disadvantages' />
|
||||
<el-table-column label="付款性质" prop='competitor_disadvantages' />
|
||||
<el-table-column label="付款金额" prop='competitor_disadvantages' />
|
||||
<el-table-column label="备注" prop='remark' />
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
<div style="margin: 10px 0;">
|
||||
<el-pagination v-model:current-page="pager4.page_no" v-model:page-size="pager4.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total3" @size-change="handleSizeChange4" @current-change="handleCurrentChange4" />
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="退款记录" name="demo-tabs-6">
|
||||
<div>
|
||||
<el-table :data="tableData4" stripe style="width: 100%">
|
||||
<el-table-column label="项目名称" prop='competitor_name' width="180" />
|
||||
<el-table-column label="退款日期" prop='competitor_contacts' width="180" />
|
||||
<el-table-column label="退款原因" prop='competitor_contacts_phone' />
|
||||
<el-table-column label="退款方式" prop='competitive_power' />
|
||||
<el-table-column label="退款金额" prop='competitor_advantages' />
|
||||
<el-table-column label="备注" prop='remark' />
|
||||
</el-table>
|
||||
</div>
|
||||
<div style="margin: 10px 0;">
|
||||
<el-pagination v-model:current-page="pager5.page_no" v-model:page-size="pager5.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total4" @size-change="handleSizeChange5" @current-change="handleCurrentChange5" />
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
@ -81,7 +165,16 @@
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { apiCustomDetail } from '@/api/custom'
|
||||
import { apiProcurementContractDetailLists } from '@/api/procurement_contract_detail'
|
||||
import { apifinancereceiptLists } from '@/api/receiptrecord'
|
||||
import { paymentplanLists } from '@/api/paymentplan'
|
||||
import { paymentapplyLists } from '@/api/paymentrequest'
|
||||
import { apiFinancerefundLists } from '@/api/refundrecord'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { TabsPaneContext } from 'element-plus'
|
||||
|
||||
const activeName = ref('demo-tabs-1')
|
||||
|
||||
import type { PropType } from 'vue'
|
||||
defineProps({
|
||||
dictData: {
|
||||
@ -89,30 +182,184 @@ defineProps({
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
|
||||
const pager1 = reactive({
|
||||
page_size: 10,
|
||||
page_no: 1,
|
||||
contract_id: ""
|
||||
})
|
||||
const pager2 = reactive({
|
||||
page_size: 10,
|
||||
page_no: 1,
|
||||
contract_id: ""
|
||||
})
|
||||
const pager3 = reactive({
|
||||
page_size: 10,
|
||||
page_no: 1,
|
||||
contract_id: ""
|
||||
})
|
||||
const pager4 = reactive({
|
||||
page_size: 10,
|
||||
page_no: 1,
|
||||
contract_id: ""
|
||||
})
|
||||
const pager5 = reactive({
|
||||
page_size: 10,
|
||||
page_no: 1,
|
||||
contract_id: ""
|
||||
})
|
||||
|
||||
const total = ref(0)
|
||||
const total1 = ref(0)
|
||||
const total2 = ref(0)
|
||||
const total3 = ref(0)
|
||||
const total4 = ref(0)
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
|
||||
const formDataannex = reactive([])
|
||||
const datas = reactive({
|
||||
provinceOptions: [],
|
||||
cityOptions: [],
|
||||
areaOptions: [],
|
||||
});
|
||||
const tableData = ref([])
|
||||
const tableData1 = ref([])
|
||||
const tableData2 = ref([])
|
||||
const tableData3 = ref([])
|
||||
const tableData4 = ref([])
|
||||
|
||||
|
||||
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
||||
console.log(tab, event)
|
||||
}
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
|
||||
})
|
||||
|
||||
|
||||
//条数
|
||||
const handleSizeChange1 = (val: number) => {
|
||||
|
||||
pager1.page_size = val
|
||||
procurementContractDetailLists()
|
||||
}
|
||||
const handleSizeChange2 = (val: number) => {
|
||||
|
||||
pager2.page_size = val
|
||||
financereceiptLists()
|
||||
}
|
||||
const handleSizeChange3 = (val: number) => {
|
||||
|
||||
pager3.page_size = val
|
||||
planLists()
|
||||
}
|
||||
const handleSizeChange4 = (val: number) => {
|
||||
|
||||
pager4.page_size = val
|
||||
payapplyLists()
|
||||
|
||||
}
|
||||
const handleSizeChange5 = (val: number) => {
|
||||
|
||||
pager5.page_size = val
|
||||
|
||||
financerefundLists()
|
||||
}
|
||||
|
||||
//分页
|
||||
const handleCurrentChange1 = (val: number) => {
|
||||
console.log(`current page: ${val}`)
|
||||
pager1.page_no = val
|
||||
procurementContractDetailLists()
|
||||
}
|
||||
const handleCurrentChange2 = (val: number) => {
|
||||
console.log(`current page: ${val}`)
|
||||
pager2.page_no = val
|
||||
financereceiptLists()
|
||||
}
|
||||
const handleCurrentChange3 = (val: number) => {
|
||||
pager3.page_no = val
|
||||
console.log(`current page: ${val}`)
|
||||
planLists()
|
||||
}
|
||||
const handleCurrentChange4 = (val: number) => {
|
||||
pager4.page_no = val
|
||||
console.log(`current page: ${val}`)
|
||||
payapplyLists()
|
||||
|
||||
}
|
||||
const handleCurrentChange5 = (val: number) => {
|
||||
pager5.page_no = val
|
||||
console.log(`current page: ${val}`)
|
||||
|
||||
financerefundLists()
|
||||
}
|
||||
// 采购明细列表
|
||||
const procurementContractDetailLists = () => {
|
||||
apiProcurementContractDetailLists(pager1).then((res) => {
|
||||
tableData.value = res.lists
|
||||
total.value = res.count
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
// 获取收票记录列表
|
||||
const financereceiptLists = () => {
|
||||
apifinancereceiptLists(pager2).then((res) => {
|
||||
tableData1.value = res.lists
|
||||
total1.value = res.count
|
||||
})
|
||||
}
|
||||
|
||||
// 获取付款计划列表
|
||||
const planLists = () => {
|
||||
paymentplanLists(pager3).then((res) => {
|
||||
tableData2.value = res.lists
|
||||
total2.value = res.count
|
||||
})
|
||||
}
|
||||
|
||||
//获取付款记录
|
||||
const payapplyLists = () => {
|
||||
paymentapplyLists(pager4).then((res) => {
|
||||
tableData3.value = res.lists
|
||||
total3.value = res.count
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//获取退款记录
|
||||
const financerefundLists = () => {
|
||||
apiFinancerefundLists(pager4).then((res) => {
|
||||
tableData4.value = res.lists
|
||||
total4.value = res.count
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
Object.assign(formData, data)
|
||||
|
||||
|
||||
|
||||
pager1.contract_id = data.id
|
||||
pager2.contract_id = data.id
|
||||
pager3.contract_id = data.id
|
||||
pager4.contract_id = data.id
|
||||
pager5.contract_id = 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)
|
||||
}
|
||||
planLists()
|
||||
procurementContractDetailLists()
|
||||
financereceiptLists()
|
||||
payapplyLists()
|
||||
financerefundLists()
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
|
@ -11,107 +11,79 @@
|
||||
<el-option v-for="(item, index) in list1" :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目名称" prop="project_id" @click="showDialog = true" :rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
||||
<el-input v-model="project_name" clearable placeholder="请选择项目" />
|
||||
</el-form-item> </el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目编码" prop="project_id" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="project_code" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item> </el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同编号" prop="contract_no" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="formData.contract_no" clearable placeholder="请输入合同编号" />
|
||||
</el-form-item> </el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同名称" prop="contract_name" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="formData.contract_name" clearable placeholder="请输入合同名称" />
|
||||
</el-form-item> </el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="供应商名称" prop="supplier_id" @change="showDialog1 = true" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-form-item label="供应商名称" prop="supplier_id" @click="showDialog1 = true" :rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
||||
<el-input v-model="supplier_name" readonly clearable placeholder="请选择供应商" />
|
||||
</el-form-item> </el-col>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="供应商编码" prop="supplier_id" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-form-item label="供应商编码" prop="supplier_id" :rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
||||
<el-input v-model="supplier_code" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
|
||||
|
||||
<el-col :span="24">
|
||||
|
||||
|
||||
<el-form-item label="合同类型" prop="contract_type" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-radio-group v-model="formData.contract_type" placeholder="请选择合同类型">
|
||||
<el-radio v-for="(item, index) in dictData.contract_type" :key="index" :label="parseInt(item.value)">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目名称" prop="project_id" @click="showDialog = true" :rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
||||
<el-input v-model="project_name" readonly clearable placeholder="请选择项目" />
|
||||
</el-form-item> </el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目编码" prop="project_id" :rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
||||
<el-input v-model="project_code" readonly disabled placeholder="系统自动填写" />
|
||||
</el-form-item> </el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同编号" prop="contract_no">
|
||||
<el-input v-model="contract_no" clearable disabled placeholder="系统自动编号" />
|
||||
</el-form-item> </el-col> <el-col :span="8">
|
||||
<el-form-item label="合同名称" prop="supplier_id">
|
||||
<el-input v-model="formData.contract_name" clearable placeholder="请输入合同名称" />
|
||||
</el-form-item> </el-col> <el-col :span="24">
|
||||
<el-form-item label="合同类型" prop="contract_type">
|
||||
<el-radio-group v-model="formData.contract_type" placeholder="请选择合同类型" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-radio v-for="(item, index) in dictData.divide_contract_type" :key="index" :label="parseInt(item.value)">
|
||||
{{ item.name }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item> </el-col>
|
||||
<el-col :span="8">
|
||||
</el-form-item> </el-col> <el-col :span="8">
|
||||
<el-form-item label="签订日期" prop="signing_date" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.signing_date" clearable type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="选择签订日期">
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.signing_date" clearable type="date" value-format="YYYY-MM-DD" placeholder="选择签订日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
</el-col> <el-col :span="24">
|
||||
<el-form-item label="付款方式" prop="pay_type">
|
||||
<el-radio-group v-model="formData.pay_type" placeholder="请选择付款方式">
|
||||
<el-radio v-for="(item, index) in dictData.pay_type" :key="index" :label="parseInt(item.value)">
|
||||
{{ item.name }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item> </el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="账期" prop="account_period" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
</el-form-item> </el-col> <el-col :span="24">
|
||||
<el-form-item label="账期" prop="account_period">
|
||||
<el-radio-group v-model="formData.account_period" placeholder="请选择账期">
|
||||
<el-radio v-for="(item, index) in dictData.account_period" :key="index" :label="parseInt(item.value)">
|
||||
{{ item.name }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item> </el-col>
|
||||
|
||||
|
||||
<el-col :span="8">
|
||||
</el-form-item> </el-col> <el-col :span="8">
|
||||
<el-form-item label="合同金额" prop="amount">
|
||||
<el-input v-model="formData.amount" clearable placeholder="请输入合同金额" @input="amountinput" />
|
||||
</el-form-item> </el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="金额大写" prop="amount_daxie" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="formData.amount_daxie" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item> </el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="税率" prop="tax_rate" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-select v-model="formData.tax_rate" placeholder="税率">
|
||||
<el-option v-for="(item, index) in dictData.tax_rate" :key="index" :label="item.name" :value="parseInt(item.value)" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-input v-model="amount" clearable placeholder="请输入合同金额" />
|
||||
</el-form-item> </el-col> <el-col :span="8">
|
||||
<el-form-item label="不含税金额" prop="amount_excluding_tax">
|
||||
<el-input v-model="formData.amount_excluding_tax" clearable placeholder="请输入不含税金额" @input="amountinput" />
|
||||
</el-form-item> </el-col>
|
||||
<el-col :span="8">
|
||||
<el-input v-model="amount_excluding_tax" disabled clearable placeholder="请输入不含税金额" />
|
||||
</el-form-item> </el-col> <el-col :span="8">
|
||||
<el-form-item label="金额大写" prop="project_id" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="amount_daxie" clearable disabled placeholder="请输入金额大写" />
|
||||
</el-form-item> </el-col> <el-col :span="8">
|
||||
<el-form-item label="质保金比例" prop="retention_money_rate">
|
||||
<el-input v-model="formData.retention_money_rate" clearable placeholder="请输入质保金比例" />
|
||||
</el-form-item> </el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="质保金" prop="retention_money">
|
||||
<el-input v-model="formData.retention_money" clearable placeholder="请输入质保金" />
|
||||
<el-form-item label="质保金" prop="project_id" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="retention_money" disabled clearable placeholder="请输入质保金" />
|
||||
</el-form-item> </el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" clearable placeholder="请输入备注" />
|
||||
</el-form-item> </el-col>
|
||||
<el-col :span="24">
|
||||
</el-form-item> </el-col> <el-col :span="8">
|
||||
<el-form-item label="附件" prop="field127">
|
||||
<el-upload accept="doc, docx, xls, xlsx, ppt, pptx, pdf, txt, zip, rar, tar, jpg, png, gif, jpeg, webp, wmv, avi, mpg, mpeg, 3gp, mov, mp4, flv, f4v, rmvb, mkv" class="upload-demo" :show-file-list="false" aria-hidden="true" :headers="{ Token: userStore.token }" :action="base_url + '/upload/file'" :on-success="handleAvatarSuccess_four" ref="upload">
|
||||
<el-button type="primary">
|
||||
@ -129,141 +101,176 @@
|
||||
|
||||
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div style="margin-bottom: 30px;">分包合同明细</div>
|
||||
<div style="margin-bottom: 30px;">
|
||||
<el-table :data="formData.work">
|
||||
<el-table-column label="序号">
|
||||
<template #default="{ row }">
|
||||
<div style=" display: flex;justify-content: flex-end;margin-bottom: 30px;">
|
||||
<el-button @click="showDialog2 = true" type="primary" plain>选择分包明细</el-button>
|
||||
|
||||
<el-button @click="handleAdd1(row)" size="small">+</el-button>
|
||||
<el-button @click="handleDelete1(row)" size="small">-</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工作类型" prop="subcontracting_budget_id">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.subcontracting_budget_id" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工作内容" prop="subcontracting_budget_id">
|
||||
<template #default="{ row }"> <el-input v-model="row.subcontracting_budget_id" /> </template></el-table-column>
|
||||
<el-table-column label="项目特征" prop="material_procurement_application_id">
|
||||
<template #default="{ row }"> <el-input v-model="row.subcontracting_budget_id" /> </template></el-table-column>
|
||||
|
||||
|
||||
|
||||
|
||||
<el-table-column label="单位" prop="tax_rate">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.tax_rate" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工作量" prop="workload">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.workload" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="含税单价" prop="unit_price_including_tax">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.unit_price_including_tax" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="不含税金额" prop="amount_excluding_tax">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.amount_excluding_tax" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="含税金额" prop="amount_including_tax">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.amount_including_tax" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label=" 备注" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div style="margin-bottom: 30px;">付款计划</div>
|
||||
<div style="margin-bottom: 30px;">
|
||||
<el-table :data="formData.pay_plan">
|
||||
<el-table-column label="序号">
|
||||
<template #default="{ row }">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<div style="margin-bottom: 30px;">分包合同明细</div>
|
||||
<div style="margin-bottom: 30px;">
|
||||
<el-table :data="subcontractList">
|
||||
<el-table-column label="序号">
|
||||
<template #default="{ row }">
|
||||
<el-button @click="handleAdd1(row)">+</el-button>
|
||||
<el-button @click="handleDelete1(row)">-</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-button @click="handleAdd(row)" size="small">+</el-button>
|
||||
<el-button @click="handleDelete(row)" size="small">-</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="期次" prop="name1">
|
||||
<template #default="{ row }">
|
||||
<el-select v-model="row.period" clearable placeholder="请选择期次">
|
||||
<el-option v-for="(item, index) in dictData.pay_period " :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划付款日期" prop="pay_date">
|
||||
<template #default="{ row }">
|
||||
<el-date-picker v-model="row.pay_date" clearable type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="选择签订日期">
|
||||
</el-date-picker>
|
||||
</template></el-table-column>
|
||||
<el-table-column label="金额" prop="pay_amount">
|
||||
<template #default="{ row }"> <el-input v-model="row.pay_amount" /> </template></el-table-column>
|
||||
<el-table-column label="工作类型" prop="work_type">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.work_type" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工作内容" prop="work_content">
|
||||
<template #default="{ row }"> <el-input v-model="row.work_content" /> </template></el-table-column>
|
||||
<el-table-column label="项目特征" prop="project_features">
|
||||
<template #default="{ row }"> <el-input v-model="row.project_features" /> </template></el-table-column>
|
||||
|
||||
<el-table-column label="备注" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<el-table-column label="单位" prop="unit">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.unit" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工作量" prop="num">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.num" @input="materialji1(row, $index)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="含税单价" prop="price">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.price" @input="materialji1(row, $index)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="税率(%)" prop="tax_rate">
|
||||
<template #default="{ row, $index }">
|
||||
|
||||
<el-select v-model="row.tax_rate" clearable placeholder="请选择税率" value-key="name" @change="materialji2(row, $index, $event)">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option v-for="(item, index) in dictData.tax_rate" :key="index" :label="item.name" :value="item" />
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="不含税金额" prop="amount_excluding_tax">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.amount_excluding_tax" prop="num" disabled />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="含税金额" prop="amount_including_tax">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.amount_including_tax" prop="num" disabled />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="margin-bottom: 30px;">付款计划</div>
|
||||
<div style="margin-bottom: 30px;">
|
||||
<el-table :data="paymentList">
|
||||
<el-table-column label="序号">
|
||||
<template #default="{ row }">
|
||||
<el-button @click="handleAdd(row)">+</el-button>
|
||||
<el-button @click="handleDelete(row)">-</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="期次" prop="name1">
|
||||
<template #default="{ row }">
|
||||
<el-select v-model="row.period" clearable placeholder="请选择期次">
|
||||
<el-option v-for="(item, index) in dictData.pay_period " :key="index" :label="item.name" :value="item.value" />
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划付款日期" prop="pay_date">
|
||||
<template #default="{ row }">
|
||||
<el-date-picker v-model="row.pay_date" clearable type="date" value-format="YYYY-MM-DD" placeholder="选择签订日期">
|
||||
</el-date-picker>
|
||||
</template></el-table-column>
|
||||
<el-table-column label="金额" prop="amount">
|
||||
<template #default="{ row }"> <el-input v-model="row.amount" /> </template></el-table-column>
|
||||
|
||||
<el-table-column label="备注" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</el-form>
|
||||
</popup>
|
||||
<el-dialog v-model="showDialog" title="选择项目" width="70%">
|
||||
<projectTable @customEvent="customEvent"></projectTable>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-model="showDialog1" title="选择供应商" width="70%">
|
||||
<suppliertable @customEvent="customEvent1"></suppliertable>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="showDialog2" title="选择分包明细" width="70%">
|
||||
<subpackageTable @customEvent="customEvent2" :project_id="formData.project_id"></subpackageTable>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="procurementContractEdit">
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { toChinesNum } from "@/utils/util";
|
||||
import projectTable from '@/components/project/index.vue'
|
||||
import suppliertable from '@/components/supplier/index.vue'
|
||||
import subpackageTable from '@/components/subpackage_budget_detail/index.vue'
|
||||
|
||||
const list1 = reactive([])
|
||||
const list2 = reactive([])
|
||||
import { deptAll } from '@/api/org/department'
|
||||
import { getAll } from '@/api/org/organization'
|
||||
import { paymentplanLists } from '@/api/paymentplan'
|
||||
|
||||
import { apiSubcontractingContractDetailLists } from '@/api/subcontracting_contract_detail'
|
||||
|
||||
import { apiSubcontractingContractAdd, apiSubcontractingContractEdit, apiSubcontractingContractDetail } from '@/api/subcontracting_contract'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { PropType } from 'vue'
|
||||
defineProps({
|
||||
let props = defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
import { toChinesNum } from "@/utils/util";
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const mode = ref('add')
|
||||
const showDialog = ref(false)
|
||||
const showDialog1 = ref(false)
|
||||
const showDialog2 = ref(false)
|
||||
const project_name = ref('')
|
||||
const project_code = ref('')
|
||||
const supplier_name = ref('')
|
||||
const supplier_code = ref('')
|
||||
const contract_no = ref('')
|
||||
const amount = ref('')
|
||||
const amount_excluding_tax = ref('')
|
||||
const amount_daxie = ref('')
|
||||
const retention_money = ref('')
|
||||
const subcontractList = reactive([])
|
||||
const paymentList = reactive([{}])
|
||||
const formDataannex = reactive([])
|
||||
const tableData = reactive([])
|
||||
const tableData1 = reactive([])
|
||||
const list1 = reactive([])
|
||||
const list2 = reactive([])
|
||||
import { deptAll } from '@/api/org/department'
|
||||
import { getAll } from '@/api/org/organization'
|
||||
import feedback from '@/utils/feedback'
|
||||
import configs from "@/config"
|
||||
const base_url = configs.baseUrl + configs.urlPrefix
|
||||
@ -289,86 +296,65 @@ const delFileFn = (index: number) => {
|
||||
}
|
||||
const handleAdd = (row: any) => {
|
||||
// 在 row 后面插入一行数据
|
||||
const index = tableData.indexOf(row);
|
||||
tableData.splice(index + 1, 0, {});
|
||||
const index = paymentList.indexOf(row);
|
||||
paymentList.splice(index + 1, 0, {});
|
||||
};
|
||||
|
||||
const handleDelete = (row: any) => {
|
||||
// 删除 row
|
||||
const index = tableData.indexOf(row);
|
||||
tableData.splice(index, 1);
|
||||
}
|
||||
const index = paymentList.indexOf(row);
|
||||
paymentList.splice(index, 1);
|
||||
};
|
||||
const handleAdd1 = (row: any) => {
|
||||
// 在 row 后面插入一行数据
|
||||
const index = subcontractList.indexOf(row);
|
||||
subcontractList.splice(index + 1, 0, {});
|
||||
};
|
||||
|
||||
const handleDelete1 = (row: any) => {
|
||||
// 删除 row
|
||||
const index = formData.pay_plan.indexOf(row);
|
||||
formData.material.splice(index, 1);
|
||||
const index = subcontractList.indexOf(row);
|
||||
subcontractList.splice(index, 1);
|
||||
};
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑分包合同' : '新增分包合同'
|
||||
})
|
||||
//监听金额大写输入
|
||||
const amountinput = (e) => {
|
||||
// console.log(e)
|
||||
if (e && e > 0) {
|
||||
formData.amount_daxie = toChinesNum(e)
|
||||
}
|
||||
|
||||
//获取分包明细
|
||||
const procurementList = (id) => {
|
||||
apiSubcontractingContractDetailLists({ 'page_no': 1, 'page_size': 5000, 'contract_id': id }).then((res) => {
|
||||
const data = res.lists.map((item: any) => ({
|
||||
'id': item.id,
|
||||
'subpackage_budget_id': item.subpackage_budget_id,
|
||||
'work_type': item.work_type,
|
||||
'work_content': item.work_content,
|
||||
'project_features': item.project_features,
|
||||
'unit': item.unit,
|
||||
'num': item.num,
|
||||
'price': item.price,
|
||||
'tax_rate': props.dictData.tax_rate.find((items) => items.name == item.tax_rate)
|
||||
}))
|
||||
// console.log(data, props.dictData)
|
||||
subcontractList.splice(0, subcontractList.length, ...data);
|
||||
})
|
||||
}
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
dept_id: '',
|
||||
org_id: '',
|
||||
supplier_id: '',
|
||||
approve_id: 1,
|
||||
project_id: '',
|
||||
contract_no: '',
|
||||
contract_name: '',
|
||||
contract_type: '',
|
||||
signing_date: '',
|
||||
pay_type: '',
|
||||
account_period: '',
|
||||
amount: '',
|
||||
tax_rate: '',
|
||||
amount_excluding_tax: '',
|
||||
amount_daxie: '',
|
||||
retention_money_rate: '',
|
||||
retention_money: '',
|
||||
remark: '',
|
||||
annex: '',
|
||||
work: [{
|
||||
subcontracting_budget_id: 2222,
|
||||
workload: 0,
|
||||
unit_price_including_tax: 0,
|
||||
remark: "",
|
||||
amount_excluding_tax: 0,
|
||||
amount_including_tax: 0
|
||||
}],
|
||||
pay_plan: [{
|
||||
period: '',
|
||||
pay_date: '',
|
||||
pay_amount: '',
|
||||
remark: ''
|
||||
}]
|
||||
})
|
||||
const customEvent = (e: any) => {
|
||||
project_name.value = e.name
|
||||
formData.project_id = e.id
|
||||
project_code.value = e.project_code
|
||||
showDialog.value = false;
|
||||
};
|
||||
const customEvent1 = (e: any) => {
|
||||
formData.supplier_id = e.id
|
||||
supplier_code.value = e.supplier_code
|
||||
supplier_name.value = e.supplier_name
|
||||
showDialog1.value = false;
|
||||
};
|
||||
//获取付款计划
|
||||
const paymentplanList = (id: any) => {
|
||||
paymentplanLists({ 'page_no': 1, 'page_size': 5000, 'contract_type': 1, 'contract_id': id }).then((res) => {
|
||||
const data = res.lists.map((item: any) => ({
|
||||
'period': item.period,
|
||||
'pay_date': item.pay_date,
|
||||
'amount': item.amount,
|
||||
'remark': item.remark,
|
||||
|
||||
}))
|
||||
paymentList.splice(0, paymentList.length, ...data);
|
||||
})
|
||||
}
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
|
||||
})
|
||||
|
||||
//获取所有组织
|
||||
const getlist = () => {
|
||||
@ -398,41 +384,125 @@ const getlist1 = (id: any) => {
|
||||
list2.splice(0, list2.length, ...res)
|
||||
})
|
||||
}
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
project_name.value = data.project.name
|
||||
project_code.value = data.project.project_code
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
dept_id: '',
|
||||
org_id: '',
|
||||
supplier_id: '',
|
||||
project_id: '',
|
||||
contract_name: '',
|
||||
contract_type: '',
|
||||
signing_date: '',
|
||||
pay_type: '',
|
||||
account_period: '',
|
||||
retention_money_rate: '',
|
||||
remark: '',
|
||||
annex: '',
|
||||
subcontracting_contract_detail: [],
|
||||
payment_plan: []
|
||||
})
|
||||
const customEvent = (e: any) => {
|
||||
project_name.value = e.name
|
||||
formData.project_id = e.id
|
||||
project_code.value = e.project_code
|
||||
showDialog.value = false;
|
||||
};
|
||||
const customEvent1 = (e: any) => {
|
||||
|
||||
formData.supplier_id = e.id;
|
||||
supplier_code.value = e.supplier_code
|
||||
supplier_name.value = e.supplier_name
|
||||
showDialog1.value = false;
|
||||
};
|
||||
const customEvent2 = (e: any) => {
|
||||
subcontractList.splice(0, subcontractList.length, {
|
||||
'subpackage_budget_detail_id': e.id,
|
||||
'work_type': e.work_type,
|
||||
'work_content': e.work_content,
|
||||
'project_features': e.project_features,
|
||||
'unit': e.unit,
|
||||
});
|
||||
|
||||
showDialog2.value = false;
|
||||
}
|
||||
//监听材料运算
|
||||
const materialji1 = (row: any, index: any) => {
|
||||
// console.log(row)
|
||||
const num = Number(row.num) || 0
|
||||
const price = Number(row.price) || 0
|
||||
const tax_rate = Number(row.tax_rate ? row.tax_rate.name : 0) || 0
|
||||
row.amount_excluding_tax = num * price
|
||||
row.amount_including_tax = (num * price * (tax_rate / 100)).toFixed(2)
|
||||
amount.value = num * price
|
||||
amount_excluding_tax.value = (num * price * (tax_rate / 100)).toFixed(2)
|
||||
};
|
||||
const materialji2 = (row: any, index: any, e) => {
|
||||
console.log(e, row)
|
||||
const num = Number(row.num) || 0
|
||||
const price = Number(row.price) || 0
|
||||
const tax_rate = Number(row.tax_rate.name) || 0
|
||||
row.amount_excluding_tax = num * price
|
||||
row.amount_including_tax = num * price * (tax_rate / 100)
|
||||
amount.value = num * price
|
||||
amount_excluding_tax.value = num * price * (tax_rate / 100)
|
||||
};
|
||||
watch(
|
||||
() => amount.value,
|
||||
() => {
|
||||
if (amount.value && amount.value > 0) {
|
||||
amount_daxie.value = toChinesNum(amount.value)
|
||||
}
|
||||
}
|
||||
if (data.dept_id) {
|
||||
getlist1(data.org_id)
|
||||
)
|
||||
//监听质保金
|
||||
watch(
|
||||
() => formData.retention_money_rate,
|
||||
() => {
|
||||
const money_rate = Number(formData.retention_money_rate) || 0
|
||||
const total = Number(amount.value) || 0
|
||||
console.log(money_rate, total)
|
||||
retention_money.value = (money_rate / 100) * total
|
||||
}
|
||||
)
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
|
||||
})
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
if (data.annex && data.annex.length > 0) {
|
||||
const arry1 = data.annex.split(',').map((item: any, index: any) => {
|
||||
const arry1 = data.annex.map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (data.amount_daxie) {
|
||||
amountinput(data.amount_daxie)
|
||||
if (data.dept_id) {
|
||||
getlist1(data.org_id)
|
||||
}
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
procurementList(data.id)
|
||||
paymentplanList(data.id)
|
||||
project_name.value = data.project_name
|
||||
project_code.value = data.project_code
|
||||
contract_no.value = data.contract_no
|
||||
supplier_name.value = data.supplier_name
|
||||
supplier_code.value = data.supplier_code
|
||||
|
||||
//@ts-ignore
|
||||
formData.signing_date = timeFormat(formData.signing_date, 'yyyy-mm-dd hh:MM:ss')
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiSubcontractingContractAdd({
|
||||
const data = await apiSubcontractingContractDetail({
|
||||
id: row.id
|
||||
})
|
||||
setFormData(data)
|
||||
@ -441,8 +511,25 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.annex = JSON.stringify(formDataannex.map((item) => item.uri))
|
||||
if (subcontractList.length > 0) {
|
||||
|
||||
formData.subcontracting_contract_detail = JSON.stringify(subcontractList.map((item) => ({
|
||||
'id': item.id,
|
||||
'subpackage_budget_detail_id': item.subpackage_budget_detail_id,
|
||||
'num': item.num,
|
||||
'price': item.price,
|
||||
'tax_rate': item.tax_rate.value,
|
||||
})))
|
||||
}
|
||||
|
||||
if (paymentList.length > 0) {
|
||||
formData.payment_plan = JSON.stringify(paymentList.map((item) => ({
|
||||
'id': item.id,
|
||||
'period': item.period,
|
||||
'remark': item.remark,
|
||||
'amount': item.amount,
|
||||
'pay_date': item.pay_date,
|
||||
})))
|
||||
}
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData, }
|
||||
@ -455,6 +542,7 @@ const handleSubmit = async () => {
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = 'add') => {
|
||||
|
||||
mode.value = type
|
||||
popupRef.value?.open()
|
||||
getlist()
|
||||
|
@ -52,28 +52,18 @@
|
||||
<el-table-column label="供应商名称" prop="supplier_name" show-overflow-tooltip />
|
||||
<el-table-column label="签订日期" prop="signing_date" show-overflow-tooltip />
|
||||
|
||||
|
||||
<el-table-column label="合同类型" prop="contract_type">
|
||||
<template #default="{ row }">
|
||||
<dict-value :options="dictData.contract_type" :value="row.contract_type" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同金额" prop="amount" show-overflow-tooltip />
|
||||
<el-table-column label="税率" prop="tax_rate">
|
||||
<template #default="{ row }">
|
||||
<dict-value :options="dictData.tax_rate" :value="row.tax_rate" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="调整金额" prop="" show-overflow-tooltip />
|
||||
<el-table-column label="不含税金额" prop="amount_excluding_tax" show-overflow-tooltip />
|
||||
<el-table-column label="实际合同金额" prop="" show-overflow-tooltip />
|
||||
<el-table-column label="已付款金额" prop="" show-overflow-tooltip />
|
||||
<el-table-column label="未付款金额" prop="" show-overflow-tooltip />
|
||||
<el-table-column label="已开票金额" prop="" show-overflow-tooltip />
|
||||
<el-table-column label="未开票金额" prop="" show-overflow-tooltip />
|
||||
<el-table-column label="已退款金额" prop="" show-overflow-tooltip />
|
||||
<el-table-column label="结算差异" prop="" show-overflow-tooltip />
|
||||
<el-table-column label="合同类型" prop="contract_type" show-overflow-tooltip />
|
||||
<el-table-column label="合同金额" prop="contract_amount" show-overflow-tooltip />
|
||||
<!-- <el-table-column label="税率" prop="tax_rate" show-overflow-tooltip /> -->
|
||||
<el-table-column label="洽商金额" prop="negotiation_amount" show-overflow-tooltip />
|
||||
<el-table-column label="不含税金额" prop="excluding_tax_amount" show-overflow-tooltip />
|
||||
<el-table-column label="实际合同金额" prop="reality_contract_amount" show-overflow-tooltip />
|
||||
<el-table-column label="已付款金额" prop="has_pay_amount" show-overflow-tooltip />
|
||||
<el-table-column label="未付款金额" prop="not_pay_amount" show-overflow-tooltip />
|
||||
<el-table-column label="已开票金额" prop="invoice_amount" show-overflow-tooltip />
|
||||
<el-table-column label="未开票金额" prop="not_invoice_amount" show-overflow-tooltip />
|
||||
<el-table-column label="已退款金额" prop="refund_amount" show-overflow-tooltip />
|
||||
<el-table-column label="结算差异" prop="settlement_difference" show-overflow-tooltip />
|
||||
|
||||
|
||||
<el-table-column label="操作" width="160" fixed="right">
|
||||
@ -135,7 +125,7 @@ const handleSelectionChange = (val: any[]) => {
|
||||
}
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData('contract_type,account_period,tax_rate,pay_type,pay_period ')
|
||||
const { dictData } = useDictData('divide_contract_type,account_period,tax_rate,pay_type,pay_period ')
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
|
165
src/views/subcontracting_contract_detail/detail.vue
Normal file
165
src/views/subcontracting_contract_detail/detail.vue
Normal file
@ -0,0 +1,165 @@
|
||||
|
||||
<template>
|
||||
<div class="detail-popup">
|
||||
<popup ref="popupRef" title="分包合同详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="120px">
|
||||
<el-card class="mb-2">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目名称">
|
||||
{{ formData.contract_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目编码">
|
||||
{{ formData.contract_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="合同名称">
|
||||
{{ formData.contract_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="合同编号">
|
||||
{{ formData.contract_code }}
|
||||
</el-form-item>
|
||||
</el-col> <el-col :span="12">
|
||||
<el-form-item label="合同类型">
|
||||
<dict-value :options="dictData.contract_type" :value="formData.contract_type" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="付款方式">
|
||||
<dict-value :options="dictData.pay_type" :value="formData.pay_type" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="账期">
|
||||
<dict-value :options="dictData.account_period" :value="formData.account_period" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="不含税金额">
|
||||
{{ formData.amount_daxie }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="含税金额">
|
||||
{{ formData.labor_costs }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="金额大写">
|
||||
{{ formData.amount_daxie }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="质保金比例">
|
||||
{{ formData.retention_money_rate }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="质保金">
|
||||
{{ formData.retention_mone }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="customdetail">
|
||||
|
||||
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: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
|
||||
const datas = reactive({
|
||||
provinceOptions: [],
|
||||
cityOptions: [],
|
||||
areaOptions: [],
|
||||
});
|
||||
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
Object.assign(formData, data)
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
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>
|
@ -31,52 +31,37 @@
|
||||
<el-table-column label="流程编号" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="项目编码" prop="project_name" show-overflow-tooltip />
|
||||
|
||||
|
||||
<!-- <el-table-column label="合同编号" prop="contract_no" show-overflow-tooltip /> -->
|
||||
<el-table-column label="合同名称" prop="contract_name" show-overflow-tooltip />
|
||||
<!-- <el-table-column label="供应商名称" prop="supplier_name" show-overflow-tooltip /> -->
|
||||
<el-table-column label="合同类型" prop="contract_type">
|
||||
<template #default="{ row }">
|
||||
<dict-value :options="dictData.contract_type" :value="row.contract_type" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同类型" prop="contract_type" show-overflow-tooltip />
|
||||
<el-table-column label="签订日期" prop="signing_date" show-overflow-tooltip />
|
||||
<!-- <el-table-column label="付款方式" prop="pay_type" show-overflow-tooltip />
|
||||
<el-table-column label="账期" prop="account_period">
|
||||
<template #default="{ row }">
|
||||
<dict-value :options="dictData.account_period" :value="row.account_period" />
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column label="合同金额" prop="amount" show-overflow-tooltip /> -->
|
||||
<el-table-column label="工作类型" prop="amount_daxie" show-overflow-tooltip />
|
||||
<el-table-column label="工作内容" prop="amount_daxie" show-overflow-tooltip />
|
||||
<el-table-column label="项目特征" prop="amount_daxie" show-overflow-tooltip />
|
||||
<el-table-column label="单位" prop="amount_daxie" show-overflow-tooltip />
|
||||
<el-table-column label="供应商名称" prop="supplier_name" 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="unit" show-overflow-tooltip />
|
||||
<el-table-column label="税率" prop="tax_rate">
|
||||
<template #default="{ row }">
|
||||
<dict-value :options="dictData.tax_rate" :value="row.tax_rate" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工作量" prop="amount_daxie" show-overflow-tooltip />
|
||||
<el-table-column label="工作量" prop="num" show-overflow-tooltip />
|
||||
<el-table-column label="不含税金额" prop="amount_excluding_tax" show-overflow-tooltip />
|
||||
<el-table-column label="含税金额" prop="amount_excluding_tax" show-overflow-tooltip />
|
||||
<!-- <el-table-column label="质保金比例" prop="retention_money" show-overflow-tooltip />
|
||||
<el-table-column label="质保金" prop="retention_money_rate" show-overflow-tooltip /> -->
|
||||
<el-table-column label="含税金额" prop="amount_including_tax" show-overflow-tooltip />
|
||||
|
||||
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
||||
<!-- <el-table-column label="操作" width="160" fixed="right">
|
||||
<el-table-column label="操作" width="160" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['contract.subcontracting_contract/edit']" type="primary" link @click="handleEdit(row)">
|
||||
<!-- <el-button v-perms="['contract.subcontracting_contract/edit']" type="primary" link @click="handleEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-perms="['contract.subcontracting_contract/delete']" type="danger" link @click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
</el-button> -->
|
||||
<el-button v-perms="['contract.subcontracting_contract/detail']" link @click="handleDetail(row)">
|
||||
详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
@ -91,11 +76,11 @@
|
||||
<script lang="ts" setup name="subcontractingContractLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiSubcontractingContractLists, apiSubcontractingContractDelete, apiSubcontractingContractDetail } from '@/api/subcontracting_contract'
|
||||
import { apiSubcontractingContractDetailLists, apiSubcontractingContractDetailDelete, apiSubcontractingContractDetailDetail } from '@/api/subcontracting_contract_detail'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import feedback from '@/utils/feedback'
|
||||
// import EditPopup from './edit.vue'
|
||||
// import DetailPopup from './detail.vue'
|
||||
import DetailPopup from './detail.vue'
|
||||
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
// 是否显示编辑框
|
||||
@ -122,7 +107,7 @@ const { dictData } = useDictData('contract_type,account_period,tax_rate,pay_type
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiSubcontractingContractLists,
|
||||
fetchFun: apiSubcontractingContractDetailLists,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
@ -135,7 +120,7 @@ const handleAdd = async () => {
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
let res = await apiSubcontractingContractDetail({ id: data.id })
|
||||
let res = await apiSubcontractingContractDetailDetail({ id: data.id })
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
@ -145,11 +130,11 @@ const handleEdit = async (data: any) => {
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
await apiSubcontractingContractDelete({ id })
|
||||
await apiSubcontractingContractDetailDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
const handleDetail = async (data: any) => {
|
||||
let res = await apiSubcontractingContractDetail({ id: data.id })
|
||||
let res = await apiSubcontractingContractDetailDetail({ id: data.id })
|
||||
showDtail.value = true
|
||||
await nextTick()
|
||||
detailRef.value?.open()
|
||||
|
@ -238,7 +238,6 @@ const formData = reactive({
|
||||
subcontracting_contract_id: '1',
|
||||
negotiation_name: '',
|
||||
negotiation_no: '',
|
||||
contract_no: '',
|
||||
negotiation_amount: '',
|
||||
negotiation_type: '',
|
||||
signing_date: '',
|
||||
|
@ -56,7 +56,7 @@
|
||||
<el-table-column label="项目编号" prop="project_code" show-overflow-tooltip />
|
||||
<el-table-column label="供应商" prop="supplier_name" show-overflow-tooltip />
|
||||
|
||||
<el-table-column label="洽商报价金额" prop="amount_including_tax" show-overflow-tooltip />
|
||||
<!-- <el-table-column label="洽商报价金额" prop="amount_including_tax" show-overflow-tooltip /> -->
|
||||
<el-table-column label="洽商金额" prop="negotiation_amount" show-overflow-tooltip />
|
||||
<el-table-column label="洽商类别" prop="contract_type">
|
||||
<template #default="{ row }">
|
||||
|
Loading…
x
Reference in New Issue
Block a user