update
This commit is contained in:
parent
bb46964ee8
commit
7acb298ca6
@ -1,26 +1,45 @@
|
|||||||
import request from '@/utils/request'
|
import request from "@/utils/request";
|
||||||
|
|
||||||
// 分包合同列表
|
// 分包合同列表
|
||||||
export function apiSubcontractingContractLists(params: any) {
|
export function apiSubcontractingContractLists(params: any) {
|
||||||
return request.get({ url: '/contract.subcontracting_contract/lists', params })
|
return request.get({
|
||||||
|
url: "/contract.subcontracting_contract/lists",
|
||||||
|
params,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 添加分包合同
|
// 添加分包合同
|
||||||
export function apiSubcontractingContractAdd(params: any) {
|
export function apiSubcontractingContractAdd(params: any) {
|
||||||
return request.post({ url: '/contract.subcontracting_contract/add', params })
|
return request.post({ url: "/contract.subcontracting_contract/add", params });
|
||||||
}
|
}
|
||||||
|
|
||||||
// 编辑分包合同
|
// 编辑分包合同
|
||||||
export function apiSubcontractingContractEdit(params: any) {
|
export function apiSubcontractingContractEdit(params: any) {
|
||||||
return request.post({ url: '/contract.subcontracting_contract/edit', params })
|
return request.post({
|
||||||
|
url: "/contract.subcontracting_contract/edit",
|
||||||
|
params,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除分包合同
|
// 删除分包合同
|
||||||
export function apiSubcontractingContractDelete(params: any) {
|
export function apiSubcontractingContractDelete(params: any) {
|
||||||
return request.post({ url: '/contract.subcontracting_contract/delete', params })
|
return request.post({
|
||||||
|
url: "/contract.subcontracting_contract/delete",
|
||||||
|
params,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 分包合同详情
|
// 分包合同详情
|
||||||
export function apiSubcontractingContractDetail(params: any) {
|
export function apiSubcontractingContractDetail(params: any) {
|
||||||
return request.get({ url: '/contract.subcontracting_contract/detail', params })
|
return request.get({
|
||||||
}
|
url: "/contract.subcontracting_contract/detail",
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function apiSubcontractingContractSearch(params: any) {
|
||||||
|
return request.get({
|
||||||
|
url: "/contract.subcontracting_contract/datas",
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -34,10 +34,10 @@
|
|||||||
<el-table-column label="供应商名称" prop="supplier_name" show-overflow-tooltip />
|
<el-table-column label="供应商名称" prop="supplier_name" show-overflow-tooltip />
|
||||||
<el-table-column label="合同类型" prop="contract_type_text" show-overflow-tooltip />
|
<el-table-column label="合同类型" prop="contract_type_text" show-overflow-tooltip />
|
||||||
<el-table-column label="税率" prop="tax_rate_text" show-overflow-tooltip />
|
<el-table-column label="税率" prop="tax_rate_text" show-overflow-tooltip />
|
||||||
<el-table-column label="材料类别" prop="material_first_level" show-overflow-tooltip />
|
|
||||||
<el-table-column label="材料中类" prop="material_second_level" show-overflow-tooltip />
|
|
||||||
<el-table-column label="材料小类" prop="material_three_level" show-overflow-tooltip />
|
<el-table-column label="材料小类" prop="material_three_level" show-overflow-tooltip />
|
||||||
<el-table-column label="材料名称" prop="material_name" show-overflow-tooltip />
|
<el-table-column label="材料名称" prop="material_name" show-overflow-tooltip />
|
||||||
|
<el-table-column label="材料类别" prop="material_first_level" show-overflow-tooltip />
|
||||||
|
<el-table-column label="材料中类" prop="material_second_level" show-overflow-tooltip />
|
||||||
<el-table-column label="材料编码" prop="material_code" show-overflow-tooltip />
|
<el-table-column label="材料编码" prop="material_code" show-overflow-tooltip />
|
||||||
<el-table-column label="规格型号" prop="material_specs" show-overflow-tooltip />
|
<el-table-column label="规格型号" prop="material_specs" show-overflow-tooltip />
|
||||||
<el-table-column label="品牌" prop="material_brand" show-overflow-tooltip />
|
<el-table-column label="品牌" prop="material_brand" show-overflow-tooltip />
|
||||||
|
@ -5,7 +5,10 @@
|
|||||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||||
<el-tab-pane label="基本信息" name="demo-tabs-1">
|
<el-tab-pane label="基本信息" name="demo-tabs-1">
|
||||||
<el-descriptions :column="2" border>
|
<el-descriptions :column="2" border>
|
||||||
|
<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"
|
<el-descriptions-item label="项目名称" label-align="left" align="left"
|
||||||
label-class-name="my-label">
|
label-class-name="my-label">
|
||||||
@ -17,10 +20,7 @@
|
|||||||
label-class-name="my-label">{{ formData.contract_name }}</el-descriptions-item>
|
label-class-name="my-label">{{ formData.contract_name }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="合同编号" label-align="left" align="left"
|
<el-descriptions-item label="合同编号" label-align="left" align="left"
|
||||||
label-class-name="my-label">{{ formData.contract_no }}</el-descriptions-item>
|
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"
|
<el-descriptions-item label="合同类型" label-align="left" align="left"
|
||||||
label-class-name="my-label">
|
label-class-name="my-label">
|
||||||
{{ formData.contract_type_text }}
|
{{ formData.contract_type_text }}
|
||||||
@ -36,7 +36,6 @@
|
|||||||
{{ formData.pay_type_text }}
|
{{ formData.pay_type_text }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
|
||||||
<el-descriptions-item label="账期" label-align="left" align="left"
|
<el-descriptions-item label="账期" label-align="left" align="left"
|
||||||
label-class-name="my-label">
|
label-class-name="my-label">
|
||||||
{{ formData.account_period_text }}
|
{{ formData.account_period_text }}
|
||||||
|
@ -3,18 +3,6 @@
|
|||||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
|
||||||
@close="handleClose">
|
@close="handleClose">
|
||||||
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
|
<el-form ref="formRef" :model="formData" label-width="120px" :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>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="供应商名称" prop="supplier_id" @click="showDialog1 = true"
|
<el-form-item label="供应商名称" prop="supplier_id" @click="showDialog1 = true"
|
||||||
@ -270,10 +258,6 @@ import projectTable from '@/components/project/index.vue'
|
|||||||
import suppliertable from '@/components/supplier/index.vue'
|
import suppliertable from '@/components/supplier/index.vue'
|
||||||
import subpackageTable from '@/components/subpackage_budget_detail/index.vue'
|
import subpackageTable from '@/components/subpackage_budget_detail/index.vue'
|
||||||
import { useDictData } from '@/hooks/useDictOptions'
|
import { useDictData } from '@/hooks/useDictOptions'
|
||||||
const list1 = reactive([])
|
|
||||||
const list2 = reactive([])
|
|
||||||
import { deptAll } from '@/api/org/department'
|
|
||||||
import { getAll } from '@/api/org/organization'
|
|
||||||
import { paymentplanLists } from '@/api/paymentplan'
|
import { paymentplanLists } from '@/api/paymentplan'
|
||||||
import { apiSubcontractingContractDetailLists } from '@/api/subcontracting_contract_detail'
|
import { apiSubcontractingContractDetailLists } from '@/api/subcontracting_contract_detail'
|
||||||
import { apiSubcontractingContractAdd, apiSubcontractingContractEdit, apiSubcontractingContractDetail } from '@/api/subcontracting_contract'
|
import { apiSubcontractingContractAdd, apiSubcontractingContractEdit, apiSubcontractingContractDetail } from '@/api/subcontracting_contract'
|
||||||
@ -384,41 +368,9 @@ const paymentplanList = (id: any) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//获取所有组织
|
|
||||||
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 formData = reactive({
|
const formData = reactive({
|
||||||
id: '',
|
id: '',
|
||||||
dept_id: '',
|
|
||||||
org_id: '',
|
|
||||||
supplier_id: '',
|
supplier_id: '',
|
||||||
project_id: '',
|
project_id: '',
|
||||||
contract_name: '',
|
contract_name: '',
|
||||||
@ -510,9 +462,6 @@ const setFormData = async (data: Record<any, any>) => {
|
|||||||
});
|
});
|
||||||
Object.assign(formDataannex, arry1)
|
Object.assign(formDataannex, arry1)
|
||||||
}
|
}
|
||||||
if (data.dept_id) {
|
|
||||||
getlist1(data.org_id)
|
|
||||||
}
|
|
||||||
for (const key in formData) {
|
for (const key in formData) {
|
||||||
if (data[key] != null && data[key] != undefined) {
|
if (data[key] != null && data[key] != undefined) {
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
@ -573,7 +522,6 @@ const open = (type = 'add') => {
|
|||||||
|
|
||||||
mode.value = type
|
mode.value = type
|
||||||
popupRef.value?.open()
|
popupRef.value?.open()
|
||||||
getlist()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 关闭回调
|
// 关闭回调
|
||||||
|
@ -2,11 +2,15 @@
|
|||||||
<div>
|
<div>
|
||||||
<el-card class="!border-none mb-4" shadow="never">
|
<el-card class="!border-none mb-4" shadow="never">
|
||||||
<el-form class="mb-[-16px]" :model="queryParams" inline label-width="auto">
|
<el-form class="mb-[-16px]" :model="queryParams" inline label-width="auto">
|
||||||
|
<el-form-item label="供应商" prop="supplier_id">
|
||||||
|
<selectRemote :formData="queryParams" model="supplier_id" :api="apiSupplierSearch" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="所属项目" prop="project_id">
|
||||||
|
<selectRemote :formData="queryParams" model="project_id" :api="apiProjectSearch" />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="合同编号" prop="contract_no">
|
<el-form-item label="合同编号" prop="contract_no">
|
||||||
<el-input class="w-[280px]" v-model="queryParams.contract_no" clearable placeholder="请输入合同编号" />
|
<el-input class="w-[280px]" v-model="queryParams.contract_no" clearable placeholder="请输入合同编号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||||
<el-button @click="resetParams">重置</el-button>
|
<el-button @click="resetParams">重置</el-button>
|
||||||
@ -30,11 +34,10 @@
|
|||||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||||
<!-- <el-table-column type="selection" width="55" /> -->
|
<!-- <el-table-column type="selection" width="55" /> -->
|
||||||
<el-table-column label="序号" type="index" width="55" />
|
<el-table-column label="序号" type="index" width="55" />
|
||||||
|
<el-table-column label="供应商名称" prop="supplier_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_no" show-overflow-tooltip />
|
||||||
<el-table-column label="合同名称" prop="contract_name" 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="signing_date" show-overflow-tooltip />
|
||||||
<el-table-column label="合同类型" prop="contract_type" 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="contract_amount" show-overflow-tooltip />
|
||||||
@ -80,9 +83,8 @@
|
|||||||
import { usePaging } from '@/hooks/usePaging'
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
import { useDictData } from '@/hooks/useDictOptions'
|
import { useDictData } from '@/hooks/useDictOptions'
|
||||||
import { apiSubcontractingContractLists, apiSubcontractingContractDelete, apiSubcontractingContractDetail } from '@/api/subcontracting_contract'
|
import { apiSubcontractingContractLists, apiSubcontractingContractDelete, apiSubcontractingContractDetail } from '@/api/subcontracting_contract'
|
||||||
import { timeFormat } from '@/utils/util'
|
import { apiProjectSearch } from '@/api/project'
|
||||||
import { apiProjectLists } from '@/api/project'
|
import { apiSupplierSearch } from '@/api/suppler_list'
|
||||||
import { apisupplierLists } from '@/api/suppler_list'
|
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import EditPopup from './edit.vue'
|
import EditPopup from './edit.vue'
|
||||||
import DetailPopup from './detail.vue'
|
import DetailPopup from './detail.vue'
|
||||||
@ -94,9 +96,9 @@ const showDtail = ref(false)
|
|||||||
|
|
||||||
// 查询条件
|
// 查询条件
|
||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
|
supplier_id: '',
|
||||||
contract_no: '',
|
project_id: '',
|
||||||
|
contract_no: ''
|
||||||
})
|
})
|
||||||
|
|
||||||
// 选中数据
|
// 选中数据
|
||||||
|
@ -1,6 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
|
<el-card class="!border-none mb-4" shadow="never">
|
||||||
|
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||||
|
<el-form-item label="分包合同" prop="contract_id">
|
||||||
|
<selectRemote :formData="queryParams" model="contract_id" :api="apiSubcontractingContractSearch" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||||
|
<el-button @click="resetParams">重置</el-button>
|
||||||
|
<export-data class="ml-2.5" :fetch-fun="apiSubcontractingContractDetailLists" :params="queryParams"
|
||||||
|
:page-size="pager.size" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||||
<!-- <el-button v-perms="['contract.subcontracting_contract/add']" type="primary" @click="handleAdd">
|
<!-- <el-button v-perms="['contract.subcontracting_contract/add']" type="primary" @click="handleAdd">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
@ -19,10 +31,10 @@
|
|||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column label="序号" type="index" width="55" />
|
<el-table-column label="序号" type="index" width="55" />
|
||||||
<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_code" show-overflow-tooltip />
|
<el-table-column label="供应商名称" prop="supplier_name" show-overflow-tooltip />
|
||||||
|
<el-table-column label="合同名称" prop="contract_name" show-overflow-tooltip />
|
||||||
<el-table-column label="合同编号" prop="contract_no" show-overflow-tooltip />
|
<el-table-column label="合同编号" prop="contract_no" show-overflow-tooltip />
|
||||||
<el-table-column label="合同类型" prop="contract_type" show-overflow-tooltip />
|
<el-table-column label="合同类型" prop="contract_type" 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_type" show-overflow-tooltip />
|
||||||
<el-table-column label="工作内容" prop="work_content" 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="project_features" show-overflow-tooltip />
|
||||||
@ -31,9 +43,7 @@
|
|||||||
<el-table-column label="工作量" prop="num" 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="amount_including_tax" 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 }">
|
<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)">
|
||||||
编辑
|
编辑
|
||||||
@ -62,7 +72,7 @@
|
|||||||
import { usePaging } from '@/hooks/usePaging'
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
import { useDictData } from '@/hooks/useDictOptions'
|
import { useDictData } from '@/hooks/useDictOptions'
|
||||||
import { apiSubcontractingContractDetailLists, apiSubcontractingContractDetailDelete, apiSubcontractingContractDetailDetail } from '@/api/subcontracting_contract_detail'
|
import { apiSubcontractingContractDetailLists, apiSubcontractingContractDetailDelete, apiSubcontractingContractDetailDetail } from '@/api/subcontracting_contract_detail'
|
||||||
import { timeFormat } from '@/utils/util'
|
import { apiSubcontractingContractSearch } from '@/api/subcontracting_contract'
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
// import EditPopup from './edit.vue'
|
// import EditPopup from './edit.vue'
|
||||||
import DetailPopup from './detail.vue'
|
import DetailPopup from './detail.vue'
|
||||||
@ -75,7 +85,7 @@ const showDtail = ref(false)
|
|||||||
|
|
||||||
// 查询条件
|
// 查询条件
|
||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
|
contract_id: ''
|
||||||
})
|
})
|
||||||
|
|
||||||
// 选中数据
|
// 选中数据
|
||||||
|
@ -3,16 +3,6 @@
|
|||||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
|
||||||
@close="handleClose">
|
@close="handleClose">
|
||||||
<el-form ref="formRef" :model="formData" label-width="160px" :rules="formRules">
|
<el-form ref="formRef" :model="formData" label-width="160px" :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>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="合同编号" prop="subcontracting_contract_id" @click="showDialog = true"
|
<el-form-item label="合同编号" prop="subcontracting_contract_id" @click="showDialog = true"
|
||||||
@ -163,8 +153,6 @@ import Popup from '@/components/popup/index.vue'
|
|||||||
import { useDictData } from '@/hooks/useDictOptions'
|
import { useDictData } from '@/hooks/useDictOptions'
|
||||||
import procurementTable from '@/components/procurement/index.vue'
|
import procurementTable from '@/components/procurement/index.vue'
|
||||||
import { apinegotiationAdd, apinegotiationEdit, apinegotiationDetail } from '@/api/subcontractor'
|
import { apinegotiationAdd, apinegotiationEdit, apinegotiationDetail } from '@/api/subcontractor'
|
||||||
import { timeFormat } from '@/utils/util'
|
|
||||||
import type { PropType } from 'vue'
|
|
||||||
const { dictData } = useDictData('negotiation_type')
|
const { dictData } = useDictData('negotiation_type')
|
||||||
let props = defineProps({
|
let props = defineProps({
|
||||||
project: Object
|
project: Object
|
||||||
@ -174,10 +162,6 @@ const formRef = shallowRef<FormInstance>()
|
|||||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||||
const mode = ref('add')
|
const mode = ref('add')
|
||||||
const showDialog = ref(false)
|
const showDialog = ref(false)
|
||||||
const list1 = reactive([])
|
|
||||||
const list2 = reactive([])
|
|
||||||
import { deptAll } from '@/api/org/department'
|
|
||||||
import { getAll } from '@/api/org/organization'
|
|
||||||
const project_name = ref('')
|
const project_name = ref('')
|
||||||
const project_code = ref('')
|
const project_code = ref('')
|
||||||
const formDataannex = reactive([])
|
const formDataannex = reactive([])
|
||||||
@ -234,59 +218,28 @@ const delFileFn1 = (index: number) => {
|
|||||||
const popupTitle = computed(() => {
|
const popupTitle = computed(() => {
|
||||||
return mode.value == 'edit' ? '编辑分包洽商' : '新增分包洽商'
|
return mode.value == 'edit' ? '编辑分包洽商' : '新增分包洽商'
|
||||||
})
|
})
|
||||||
//获取所有组织
|
|
||||||
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 formData = reactive({
|
const formData = reactive({
|
||||||
id: '',
|
id: '',
|
||||||
dept_id: '',
|
|
||||||
org_id: '',
|
|
||||||
subcontracting_contract_id: '1',
|
subcontracting_contract_id: '1',
|
||||||
negotiation_name: '',
|
negotiation_name: '',
|
||||||
negotiation_no: '',
|
negotiation_no: '',
|
||||||
negotiation_amount: '',
|
negotiation_amount: '',
|
||||||
negotiation_type: '',
|
negotiation_type: '',
|
||||||
signing_date: '',
|
sign_date: '',
|
||||||
warranty_amount: '',
|
warranty_amount: '',
|
||||||
Warranty_expire_date: '',
|
warranty_expire_date: '',
|
||||||
negotiation_content: '',
|
negotiation_content: '',
|
||||||
negotiation_quotation: [],
|
negotiation_quotation: [],
|
||||||
negotiation_basis: [],
|
negotiation_basis: [],
|
||||||
negotiation_detail: "",
|
negotiation_detail: "",
|
||||||
"sign_date": "",
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const customEvent = (e: any) => {
|
const customEvent = (e: any) => {
|
||||||
contract_no.value = e.contract_no;
|
contract_no.value = e.contract_no;
|
||||||
supplier_name.value = e.supplier_name;
|
supplier_name.value = e.supplier_name;
|
||||||
supplier_code.value = e.supplier_code;
|
supplier_code.value = e.supplier_code;
|
||||||
formData.signing_date = e.signing_date;
|
formData.sign_date = e.signing_date;
|
||||||
project_name.value = e.project_name;
|
project_name.value = e.project_name;
|
||||||
formData.subcontracting_contract_id = e.id;
|
formData.subcontracting_contract_id = e.id;
|
||||||
project_code.value = e.project_code
|
project_code.value = e.project_code
|
||||||
@ -317,9 +270,6 @@ const setFormData = async (data: Record<any, any>) => {
|
|||||||
});
|
});
|
||||||
Object.assign(formDataannex, arry1)
|
Object.assign(formDataannex, arry1)
|
||||||
}
|
}
|
||||||
if (data.dept_id) {
|
|
||||||
getlist1(data.org_id)
|
|
||||||
}
|
|
||||||
if (data.negotiation_basis.length > 0) {
|
if (data.negotiation_basis.length > 0) {
|
||||||
|
|
||||||
const arry1 = data.negotiation_basis.map((item: any, index: any) => {
|
const arry1 = data.negotiation_basis.map((item: any, index: any) => {
|
||||||
@ -374,7 +324,6 @@ const handleSubmit = async () => {
|
|||||||
const open = (type = 'add') => {
|
const open = (type = 'add') => {
|
||||||
mode.value = type
|
mode.value = type
|
||||||
popupRef.value?.open()
|
popupRef.value?.open()
|
||||||
getlist()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 关闭回调
|
// 关闭回调
|
||||||
|
@ -2,11 +2,13 @@
|
|||||||
<div>
|
<div>
|
||||||
<el-card class="!border-none mb-4" shadow="never">
|
<el-card class="!border-none mb-4" shadow="never">
|
||||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||||
<el-form-item label="洽商单名称" prop="negotiation_name">
|
<el-form-item label="关联合同" prop="subcontracting_contract_id">
|
||||||
<el-input class="w-[280px]" v-model="queryParams.negotiation_name" clearable
|
<selectRemote :formData="queryParams" model="subcontracting_contract_id"
|
||||||
placeholder="请输入洽商单名称" />
|
:api="apiSubcontractingContractSearch" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="所属项目" prop="project_id">
|
||||||
|
<selectRemote :formData="queryParams" model="project_id" :api="apiProjectSearch" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="洽商编号" prop="negotiation_no">
|
<el-form-item label="洽商编号" prop="negotiation_no">
|
||||||
<el-input class="w-[280px]" v-model="queryParams.negotiation_no" clearable placeholder="请输入洽商编号" />
|
<el-input class="w-[280px]" v-model="queryParams.negotiation_no" clearable placeholder="请输入洽商编号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -41,17 +43,15 @@
|
|||||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column label="序号" type="index" width="55" />
|
<el-table-column label="序号" type="index" width="55" />
|
||||||
<el-table-column label="洽商编号" prop="negotiation_no" show-overflow-tooltip />
|
<el-table-column label="供应商名称" prop="supplier_name" 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_name" show-overflow-tooltip />
|
||||||
<el-table-column label="项目编号" prop="project_code" 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="negotiation_no" show-overflow-tooltip />
|
||||||
|
<el-table-column label="洽商单名称" prop="negotiation_name" show-overflow-tooltip />
|
||||||
<el-table-column label="洽商金额" prop="negotiation_amount" show-overflow-tooltip />
|
<el-table-column label="洽商金额" prop="negotiation_amount" show-overflow-tooltip />
|
||||||
<el-table-column label="洽商类别" prop="negotiation_type_text" show-overflow-tooltip />
|
<el-table-column label="洽商类别" prop="negotiation_type_text" show-overflow-tooltip />
|
||||||
<el-table-column label="洽商质保金额" prop="warranty_amount" show-overflow-tooltip />
|
<el-table-column label="洽商质保金额" prop="warranty_amount" show-overflow-tooltip />
|
||||||
<el-table-column label="洽商质保到期时间" prop="warranty_expire_date" show-overflow-tooltip />
|
<el-table-column label="洽商质保到期时间" prop="warranty_expire_date" 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 }">
|
<template #default="{ row }">
|
||||||
@ -84,6 +84,8 @@
|
|||||||
import { usePaging } from '@/hooks/usePaging'
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
import { useDictData } from '@/hooks/useDictOptions'
|
import { useDictData } from '@/hooks/useDictOptions'
|
||||||
import { apinegotiationLists, apinegotiationDelete, apinegotiationDetail } from '@/api/subcontractor'
|
import { apinegotiationLists, apinegotiationDelete, apinegotiationDetail } from '@/api/subcontractor'
|
||||||
|
import { apiSubcontractingContractSearch } from '@/api/subcontracting_contract'
|
||||||
|
import { apiProjectSearch } from '@/api/project'
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import EditPopup from './edit.vue'
|
import EditPopup from './edit.vue'
|
||||||
import DetailPopup from './detail.vue'
|
import DetailPopup from './detail.vue'
|
||||||
@ -96,9 +98,9 @@ const showDtail = ref(false)
|
|||||||
// 查询条件
|
// 查询条件
|
||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
negotiation_no: '',
|
negotiation_no: '',
|
||||||
negotiation_name: '',
|
subcontracting_contract_id: '',
|
||||||
negotiation_type: ''
|
negotiation_type: '',
|
||||||
|
project_id: ''
|
||||||
})
|
})
|
||||||
|
|
||||||
// 选中数据
|
// 选中数据
|
||||||
|
Loading…
x
Reference in New Issue
Block a user