add
This commit is contained in:
parent
d792a9665e
commit
c415828eb4
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@ -1,7 +1,7 @@
|
||||
{
|
||||
"editor.formatOnSave": true,
|
||||
"[vue]": {
|
||||
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
|
||||
"editor.defaultFormatter": "Vue.volar"
|
||||
},
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"[javascript]": {
|
||||
|
@ -1,424 +1,505 @@
|
||||
interface Iconfig{
|
||||
/** 请求列表的接口*/
|
||||
fetchFn:Function,
|
||||
interface Iconfig {
|
||||
/** 请求列表的接口*/
|
||||
fetchFn: Function;
|
||||
|
||||
/**用户可搜索的内容,select为下拉列表,select为数组时为自定义option,w为string时表示获取字典里的值 */
|
||||
serchList:Array<{label:String,value:String,select?:Array<{name:string,value:string|Number}>|String }>,
|
||||
/**用户可搜索的内容,select为下拉列表,select为数组时为自定义option,w为string时表示获取字典里的值 */
|
||||
serchList: Array<{
|
||||
label: String;
|
||||
value: String;
|
||||
select?: Array<{ name: string; value: string | Number }> | String;
|
||||
}>;
|
||||
|
||||
/**需要的字典数据,以,隔开的string */
|
||||
dictData?:String,
|
||||
/**需要的字典数据,以,隔开的string */
|
||||
dictData?: String;
|
||||
|
||||
/**table配置 */
|
||||
tableList:Array<Object>,
|
||||
/**table配置 */
|
||||
tableList: Array<Object>;
|
||||
}
|
||||
|
||||
import { apiSupervisionProjectLists } from '@/api/supervision_project'
|
||||
import { apiSupervisionParticipatingUnitsLists, } from '@/api/supervision_participating_units'
|
||||
import { apiSupervisionCheckItemLists } from '@/api/supervision_check_item'
|
||||
import { apiManageProjectLists} from '@/api/manage_project'
|
||||
import { apiSupervisionDangerousEngineeringMonitoringLists, } from '@/api/supervision_dangerous_engineering_monitoring'
|
||||
import { apiSupervisionMaterialEntryLists } from '@/api/supervision_material_entry'
|
||||
import { apiSupervisionParticipatingUnitsQualificationsLists } from '@/api/supervision_participating_units_qualifications'
|
||||
import { apiCostApprovedProjectLists } from '@/api/cost_approved_project'
|
||||
import { apiCostProjectLists } from '@/api/cost_project'
|
||||
import { apiTaskTypeLists } from '@/api/task_type'
|
||||
import {apiSupervisionMaterialEquipmentInfoLists}from "@/api/supervision_material_equipment_info"
|
||||
import { apiConsultProjectLists} from '@/api/consult_project'
|
||||
import { apiZjzxInvoiceLists } from '@/api/zjzx_invoice'
|
||||
import { apiSupervisionProjectLists } from "@/api/supervision_project";
|
||||
import { apiSupervisionParticipatingUnitsLists } from "@/api/supervision_participating_units";
|
||||
import { apiSupervisionCheckItemLists } from "@/api/supervision_check_item";
|
||||
import { apiManageProjectLists } from "@/api/manage_project";
|
||||
import { apiSupervisionDangerousEngineeringMonitoringLists } from "@/api/supervision_dangerous_engineering_monitoring";
|
||||
import { apiSupervisionMaterialEntryLists } from "@/api/supervision_material_entry";
|
||||
import { apiSupervisionParticipatingUnitsQualificationsLists } from "@/api/supervision_participating_units_qualifications";
|
||||
import { apiCostApprovedProjectLists } from "@/api/cost_approved_project";
|
||||
import { apiCostProjectLists } from "@/api/cost_project";
|
||||
import { apiTaskTypeLists } from "@/api/task_type";
|
||||
import { apiSupervisionMaterialEquipmentInfoLists } from "@/api/supervision_material_equipment_info";
|
||||
import { apiConsultProjectLists } from "@/api/consult_project";
|
||||
import { apiZjzxInvoiceLists } from "@/api/zjzx_invoice";
|
||||
import { apiSubcontractingContractLists } from "@/api/subcontracting_contract";
|
||||
import { apisupplierLists } from "@/api/suppler_list";
|
||||
|
||||
export const supervision_project: Iconfig = {
|
||||
fetchFn: apiSupervisionProjectLists,
|
||||
serchList: [
|
||||
{
|
||||
label: "项目名称",
|
||||
value: "project_name",
|
||||
},
|
||||
{
|
||||
label: "项目编号",
|
||||
value: "project_code",
|
||||
},
|
||||
],
|
||||
tableList: [
|
||||
{ project_name: "项目名称" },
|
||||
{ project_code: "项目编号" },
|
||||
{ industry_text: "性质" },
|
||||
{ build_unit: "建设单位" },
|
||||
{ build_area_text: "建设区域" },
|
||||
{ address: "项目地址" },
|
||||
{ project_level_text: "项目等级" },
|
||||
{ total_investment: "总投资" },
|
||||
{ initiation_date: "立项日期" },
|
||||
{ contract: "关联合同" },
|
||||
{ contract_amount: "合同金额" },
|
||||
{ project_overview: "项目概况" },
|
||||
{ contract_content: "合同服务内容" },
|
||||
{ project_requirements: "项目要求" },
|
||||
{ remark: "备注" },
|
||||
{ supervision_department: "监管部门" },
|
||||
{ implementation_department: "实施部门" },
|
||||
{ project_department: "项目部" },
|
||||
{ engineering_status_text: "工程状态" },
|
||||
{ project_manager: "项目负责人员" },
|
||||
{ part_a_unit: "甲方单位" },
|
||||
],
|
||||
};
|
||||
|
||||
export const supervision_participating_units: Iconfig = {
|
||||
fetchFn: apiSupervisionParticipatingUnitsLists,
|
||||
serchList: [
|
||||
{
|
||||
label: "单位名称",
|
||||
value: "unit_name",
|
||||
},
|
||||
{
|
||||
label: "资质等级",
|
||||
value: "qualification_grade",
|
||||
},
|
||||
],
|
||||
tableList: [
|
||||
{ unit_name: "单位名称" },
|
||||
{ unit_type_text: "单位类别" },
|
||||
{ qualification_grade: "资质等级" },
|
||||
{ telephone: "联系电话" },
|
||||
{ duty: "责任范围" },
|
||||
],
|
||||
};
|
||||
|
||||
export const supervision_project:Iconfig = {
|
||||
fetchFn: apiSupervisionProjectLists,
|
||||
serchList: [
|
||||
{
|
||||
label: '项目名称',
|
||||
value: "project_name"
|
||||
},
|
||||
{
|
||||
label: '项目编号',
|
||||
value: "project_code"
|
||||
},
|
||||
],
|
||||
tableList: [
|
||||
{ project_name: "项目名称" },
|
||||
{ project_code: "项目编号" },
|
||||
{ industry_text: "性质" },
|
||||
{ build_unit: "建设单位" },
|
||||
{ build_area_text: "建设区域" },
|
||||
{ address: "项目地址" },
|
||||
{ project_level_text: "项目等级" },
|
||||
{ total_investment: "总投资" },
|
||||
{ initiation_date: "立项日期" },
|
||||
{ contract: "关联合同" },
|
||||
{ contract_amount: "合同金额" },
|
||||
{ project_overview: "项目概况" },
|
||||
{ contract_content: "合同服务内容" },
|
||||
{ project_requirements: "项目要求" },
|
||||
{ remark: "备注" },
|
||||
{ supervision_department: "监管部门" },
|
||||
{ implementation_department: "实施部门" },
|
||||
{ project_department: "项目部" },
|
||||
{ engineering_status_text: "工程状态" },
|
||||
{ project_manager: "项目负责人员" },
|
||||
{ part_a_unit: "甲方单位" },
|
||||
]
|
||||
}
|
||||
export const supervision_check_item: Iconfig = {
|
||||
fetchFn: apiSupervisionCheckItemLists,
|
||||
dictData: "check_item_node_type",
|
||||
serchList: [
|
||||
{
|
||||
label: "节点名称",
|
||||
value: "node_name",
|
||||
},
|
||||
{
|
||||
label: "节点类型",
|
||||
value: "node_type",
|
||||
select: "check_item_node_type",
|
||||
},
|
||||
],
|
||||
tableList: [
|
||||
{ project_name: "项目名称" },
|
||||
{ node_name: "节点名称" },
|
||||
{ node_type_text: "节点类型" },
|
||||
{ node_code: "节点编号" },
|
||||
],
|
||||
};
|
||||
|
||||
export const supervision_participating_units:Iconfig = {
|
||||
fetchFn: apiSupervisionParticipatingUnitsLists,
|
||||
serchList: [
|
||||
{
|
||||
label: '单位名称',
|
||||
value: "unit_name"
|
||||
},
|
||||
{
|
||||
label: '资质等级',
|
||||
value: "qualification_grade"
|
||||
},
|
||||
],
|
||||
tableList: [
|
||||
{ unit_name: "单位名称" },
|
||||
{ unit_type_text: "单位类别" },
|
||||
{ qualification_grade: "资质等级" },
|
||||
{ telephone: "联系电话" },
|
||||
{ duty: "责任范围" },
|
||||
]
|
||||
}
|
||||
export const manage_project: Iconfig = {
|
||||
fetchFn: apiManageProjectLists,
|
||||
dictData: "cost_consultation_industry_nature,industry,engineering_status",
|
||||
serchList: [
|
||||
{
|
||||
label: "项目名称",
|
||||
value: "project_name",
|
||||
},
|
||||
{
|
||||
label: "项目编号",
|
||||
value: "project_code",
|
||||
},
|
||||
{
|
||||
label: "性质",
|
||||
value: "nature",
|
||||
select: "cost_consultation_industry_nature",
|
||||
},
|
||||
{
|
||||
label: "行业",
|
||||
value: "industry",
|
||||
select: "industry",
|
||||
},
|
||||
{
|
||||
label: "工程状态",
|
||||
value: "engineering_status",
|
||||
select: "engineering_status",
|
||||
},
|
||||
],
|
||||
tableList: [
|
||||
{ project_name: "项目名称" },
|
||||
{ project_code: "项目编号" },
|
||||
{ nature_text: "性质" },
|
||||
{ industry_text: "行业" },
|
||||
{ build_area_text: "建设区域" },
|
||||
{ project_level_text: "项目级别" },
|
||||
{ total_investment: "总投资" },
|
||||
{ engineering_status_text: "工程状态" },
|
||||
{ implementation_department: "实施部门" },
|
||||
{ supervision_department: "监管部门" },
|
||||
{ project_manager: "项目经理" },
|
||||
],
|
||||
};
|
||||
|
||||
export const supervision_check_item:Iconfig = {
|
||||
fetchFn: apiSupervisionCheckItemLists,
|
||||
dictData:'check_item_node_type',
|
||||
serchList: [
|
||||
{
|
||||
label: '节点名称',
|
||||
value: "node_name"
|
||||
},
|
||||
{
|
||||
label: '节点类型',
|
||||
value: "node_type",
|
||||
select:'check_item_node_type'
|
||||
},
|
||||
],
|
||||
tableList: [
|
||||
{ project_name: "项目名称" },
|
||||
{ node_name: "节点名称" },
|
||||
{ node_type_text: "节点类型" },
|
||||
{ node_code: "节点编号" },
|
||||
]
|
||||
}
|
||||
export const supervision_dangerous_engineering_monitoring: Iconfig = {
|
||||
fetchFn: apiSupervisionDangerousEngineeringMonitoringLists,
|
||||
dictData: "partial_project",
|
||||
serchList: [
|
||||
{
|
||||
label: "危大工程类型",
|
||||
value: "type",
|
||||
},
|
||||
{
|
||||
label: "分部分项工程",
|
||||
value: "partial_project",
|
||||
select: "partial_project",
|
||||
},
|
||||
{
|
||||
label: "施工部位",
|
||||
value: "position",
|
||||
},
|
||||
],
|
||||
tableList: [
|
||||
{ project_name: "项目名称" },
|
||||
{ type_text: "危大工程类型" },
|
||||
{ partial_project_text: "分部分项工程" },
|
||||
{ planned_construction_time: "计划施工时间" },
|
||||
{ position: "施工部位" },
|
||||
],
|
||||
};
|
||||
|
||||
export const manage_project:Iconfig = {
|
||||
fetchFn: apiManageProjectLists,
|
||||
dictData:'cost_consultation_industry_nature,industry,engineering_status',
|
||||
serchList: [
|
||||
{
|
||||
label: '项目名称',
|
||||
value: "project_name"
|
||||
},
|
||||
{
|
||||
label: '项目编号',
|
||||
value: "project_code",
|
||||
},
|
||||
{
|
||||
label:"性质",
|
||||
value:'nature',
|
||||
select:'cost_consultation_industry_nature'
|
||||
},
|
||||
{
|
||||
label:"行业",
|
||||
value:'industry',
|
||||
select:"industry"
|
||||
},
|
||||
{
|
||||
label:"工程状态",
|
||||
value:'engineering_status',
|
||||
select:"engineering_status"
|
||||
}
|
||||
|
||||
],
|
||||
tableList: [
|
||||
{ project_name: "项目名称" },
|
||||
{ project_code: "项目编号" },
|
||||
{ nature_text: "性质" },
|
||||
{ industry_text: "行业" },
|
||||
{ build_area_text: "建设区域" },
|
||||
{ project_level_text: "项目级别" },
|
||||
{ total_investment: "总投资" },
|
||||
{ engineering_status_text: "工程状态" },
|
||||
{ implementation_department: "实施部门" },
|
||||
{ supervision_department: "监管部门" },
|
||||
{ project_manager: "项目经理" },
|
||||
]
|
||||
}
|
||||
export const supervision_material_entry: Iconfig = {
|
||||
fetchFn: apiSupervisionMaterialEntryLists,
|
||||
serchList: [
|
||||
{
|
||||
label: "进场主题",
|
||||
value: "theme",
|
||||
},
|
||||
{
|
||||
label: "编号",
|
||||
value: "code",
|
||||
},
|
||||
],
|
||||
tableList: [
|
||||
{ project_name: "项目名称" },
|
||||
{ company_name: "采购单位" },
|
||||
{ theme: "进场主题" },
|
||||
{ code: "编号" },
|
||||
{ enter_time: "进场时间" },
|
||||
{ enter_result_text: "进场结果" },
|
||||
{ parallel_test_text: "是否平行检验" },
|
||||
],
|
||||
};
|
||||
|
||||
export const supervision_dangerous_engineering_monitoring:Iconfig = {
|
||||
fetchFn: apiSupervisionDangerousEngineeringMonitoringLists,
|
||||
dictData:'partial_project',
|
||||
serchList: [
|
||||
export const supervision_material_equipment_info: Iconfig = {
|
||||
fetchFn: apiSupervisionMaterialEquipmentInfoLists,
|
||||
serchList: [
|
||||
{
|
||||
label: "材料/设备名称",
|
||||
value: "name",
|
||||
},
|
||||
{
|
||||
label: "材料/设备品牌",
|
||||
value: "brand",
|
||||
},
|
||||
{
|
||||
label: "合同约定品牌",
|
||||
value: "contract_brand",
|
||||
select: [
|
||||
{
|
||||
label: '危大工程类型',
|
||||
value: "type"
|
||||
name: "否",
|
||||
value: 0,
|
||||
},
|
||||
{
|
||||
label:"分部分项工程",
|
||||
value:'partial_project',
|
||||
select:"partial_project"
|
||||
name: "是",
|
||||
value: 1,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "类型",
|
||||
value: "type",
|
||||
select: [
|
||||
{
|
||||
name: "材料",
|
||||
value: 0,
|
||||
},
|
||||
{
|
||||
label:"施工部位",
|
||||
value:'position',
|
||||
}
|
||||
|
||||
],
|
||||
tableList: [
|
||||
{ project_name: "项目名称" },
|
||||
{ type_text: "危大工程类型" },
|
||||
{ partial_project_text: "分部分项工程" },
|
||||
{ planned_construction_time: "计划施工时间" },
|
||||
{ position: "施工部位" },
|
||||
]
|
||||
}
|
||||
name: "设备",
|
||||
value: 1,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
tableList: [
|
||||
{ project_name: "项目名称" },
|
||||
{ name: "材料/设备名称" },
|
||||
{ brand: "材料/设备品牌" },
|
||||
{ model: "型号" },
|
||||
{ unit: "计数单位" },
|
||||
{ number: "计划数量" },
|
||||
{ contract_brand_text: "合同约定品牌" },
|
||||
{ type_text: "类型" },
|
||||
{ remark: "备注" },
|
||||
],
|
||||
};
|
||||
|
||||
export const supervision_material_entry:Iconfig = {
|
||||
fetchFn: apiSupervisionMaterialEntryLists,
|
||||
serchList: [
|
||||
{
|
||||
label: '进场主题',
|
||||
value: "theme"
|
||||
},
|
||||
{
|
||||
label:"编号",
|
||||
value:'code',
|
||||
},
|
||||
],
|
||||
tableList: [
|
||||
{ project_name: "项目名称" },
|
||||
{ company_name: "采购单位" },
|
||||
{ theme: "进场主题" },
|
||||
{ code: "编号" },
|
||||
{ enter_time: "进场时间" },
|
||||
{ enter_result_text: "进场结果" },
|
||||
{ parallel_test_text: "是否平行检验" },
|
||||
]
|
||||
}
|
||||
export const supervision_participating_units_qualifications: Iconfig = {
|
||||
fetchFn: apiSupervisionParticipatingUnitsQualificationsLists,
|
||||
serchList: [
|
||||
{
|
||||
label: "资质名称",
|
||||
value: "qualification_name",
|
||||
},
|
||||
{
|
||||
label: "资质编号",
|
||||
value: "qualification_number",
|
||||
},
|
||||
],
|
||||
tableList: [
|
||||
{ project_name: "项目名称" },
|
||||
{ company_name: "所属单位" },
|
||||
{ qualification_name: "资质名称" },
|
||||
{ qualification_number: "资质编号" },
|
||||
{ get_date: "发证日期" },
|
||||
{ effective_date: "有效日期" },
|
||||
{ qualification_status_text: "资质状态" },
|
||||
{ remark: "备注" },
|
||||
],
|
||||
};
|
||||
|
||||
export const supervision_material_equipment_info:Iconfig = {
|
||||
fetchFn: apiSupervisionMaterialEquipmentInfoLists,
|
||||
serchList: [
|
||||
{
|
||||
label: '材料/设备名称',
|
||||
value: "name"
|
||||
},
|
||||
{
|
||||
label:"材料/设备品牌",
|
||||
value:'brand',
|
||||
},
|
||||
{
|
||||
label:"合同约定品牌",
|
||||
value:'contract_brand',
|
||||
select:[
|
||||
{
|
||||
name:"否",
|
||||
value:0
|
||||
},
|
||||
{
|
||||
name:"是",
|
||||
value:1
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
label:"类型",
|
||||
value:'type',
|
||||
select:[
|
||||
{
|
||||
name:"材料",
|
||||
value:0
|
||||
},
|
||||
{
|
||||
name:"设备",
|
||||
value:1
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
],
|
||||
tableList: [
|
||||
{ project_name: "项目名称" },
|
||||
{ name: "材料/设备名称" },
|
||||
{ brand: "材料/设备品牌" },
|
||||
{ model: "型号" },
|
||||
{ unit: "计数单位" },
|
||||
{ number: "计划数量" },
|
||||
{ contract_brand_text: "合同约定品牌" },
|
||||
{ type_text: "类型" },
|
||||
{ remark: "备注" },
|
||||
]
|
||||
}
|
||||
export const cost_approved_projects: Iconfig = {
|
||||
fetchFn: apiCostApprovedProjectLists,
|
||||
serchList: [
|
||||
{
|
||||
label: "合同名称",
|
||||
value: "contract_name",
|
||||
},
|
||||
{
|
||||
label: "合同编号",
|
||||
value: "contract_num",
|
||||
},
|
||||
],
|
||||
tableList: [
|
||||
{ contract_num: "合同编号" },
|
||||
{ contract_name: "合同名称" },
|
||||
{ part_a: "甲方签约单位" },
|
||||
{ part_b: "乙方签约单位" },
|
||||
{ start_date: "合同计划开始日期" },
|
||||
{ end_date: "合同计划结束日期" },
|
||||
{ project_money: "工程总投资" },
|
||||
{ business_nature_text: "业务性质" },
|
||||
{ dept: "签订部门" },
|
||||
{ fund_sources_text: "资金来源" },
|
||||
{ project_director: "项目总监" },
|
||||
{ regulators: "监管部门" },
|
||||
],
|
||||
};
|
||||
|
||||
export const supervision_participating_units_qualifications:Iconfig = {
|
||||
fetchFn: apiSupervisionParticipatingUnitsQualificationsLists,
|
||||
serchList: [
|
||||
{
|
||||
label: '资质名称',
|
||||
value: "qualification_name"
|
||||
},
|
||||
{
|
||||
label:"资质编号",
|
||||
value:'qualification_number',
|
||||
},
|
||||
],
|
||||
tableList: [
|
||||
{ project_name: "项目名称" },
|
||||
{ company_name: "所属单位" },
|
||||
{ qualification_name: "资质名称" },
|
||||
{ qualification_number: "资质编号" },
|
||||
{ get_date: "发证日期" },
|
||||
{ effective_date: "有效日期" },
|
||||
{ qualification_status_text: "资质状态" },
|
||||
{ remark: "备注" },
|
||||
]
|
||||
}
|
||||
export const cost_project: Iconfig = {
|
||||
fetchFn: apiCostProjectLists,
|
||||
serchList: [
|
||||
{
|
||||
label: "项目编号",
|
||||
value: "project_num",
|
||||
},
|
||||
{
|
||||
label: "项目名称",
|
||||
value: "project_name",
|
||||
},
|
||||
],
|
||||
tableList: [
|
||||
{ project_name: "项目名称" },
|
||||
{ address: "具体地址" },
|
||||
{ starting: "计划开始日期" },
|
||||
{ endtime: "计划结束日期" },
|
||||
{ jhgq: "计划工期(天)" },
|
||||
{ person_text: "项目相关人员" },
|
||||
{ invest: "项目总投资(元)" },
|
||||
{ budget: "预算造价(元)" },
|
||||
{ cost: "送审造价(元)" },
|
||||
{ approval: "审定造价(元)" },
|
||||
{ aunit: "委托单位" },
|
||||
{ acontactnum: "联系电话" },
|
||||
{ date: "登记日期" },
|
||||
{ generalize: "项目规模及概括" },
|
||||
{ note: "注意事项" },
|
||||
{ remark: "备注" },
|
||||
],
|
||||
};
|
||||
|
||||
export const cost_approved_projects:Iconfig = {
|
||||
fetchFn: apiCostApprovedProjectLists,
|
||||
serchList: [
|
||||
{
|
||||
label: '合同名称',
|
||||
value: "contract_name"
|
||||
},
|
||||
{
|
||||
label:"合同编号",
|
||||
value:'contract_num',
|
||||
},
|
||||
],
|
||||
tableList: [
|
||||
{ contract_num: "合同编号" },
|
||||
{ contract_name: "合同名称" },
|
||||
{ part_a: "甲方签约单位" },
|
||||
{ part_b: "乙方签约单位" },
|
||||
{ start_date: "合同计划开始日期" },
|
||||
{ end_date: "合同计划结束日期" },
|
||||
{ project_money: "工程总投资" },
|
||||
{ business_nature_text: "业务性质" },
|
||||
{ dept: "签订部门" },
|
||||
{ fund_sources_text: "资金来源" },
|
||||
{ project_director: "项目总监" },
|
||||
{ regulators: "监管部门" },
|
||||
]
|
||||
}
|
||||
export const task_type: Iconfig = {
|
||||
fetchFn: apiTaskTypeLists,
|
||||
dictData: "superior_category",
|
||||
serchList: [
|
||||
{
|
||||
label: "任务名称",
|
||||
value: "unit_name",
|
||||
},
|
||||
{
|
||||
label: "上级类别",
|
||||
value: "superior_sort",
|
||||
select: "superior_category",
|
||||
},
|
||||
],
|
||||
tableList: [
|
||||
{ dataid: "标识" },
|
||||
{ num: "任务编号" },
|
||||
{ name: "任务名称" },
|
||||
{ level: "任务级次" },
|
||||
{ remarks: "备注" },
|
||||
],
|
||||
};
|
||||
|
||||
export const cost_project:Iconfig = {
|
||||
fetchFn: apiCostProjectLists,
|
||||
serchList: [
|
||||
{
|
||||
label: '项目编号',
|
||||
value: "project_num"
|
||||
},
|
||||
{
|
||||
label:"项目名称",
|
||||
value:'project_name',
|
||||
},
|
||||
],
|
||||
tableList: [
|
||||
{ project_name: "项目名称" },
|
||||
{ address: "具体地址" },
|
||||
{ starting: "计划开始日期" },
|
||||
{ endtime: "计划结束日期" },
|
||||
{ jhgq: "计划工期(天)" },
|
||||
{ person_text: "项目相关人员" },
|
||||
{ invest: "项目总投资(元)" },
|
||||
{ budget: "预算造价(元)" },
|
||||
{ cost: "送审造价(元)" },
|
||||
{ approval: "审定造价(元)" },
|
||||
{ aunit: "委托单位" },
|
||||
{ acontactnum: "联系电话" },
|
||||
{ date: "登记日期" },
|
||||
{ generalize: "项目规模及概括" },
|
||||
{ note: "注意事项" },
|
||||
{ remark: "备注" },
|
||||
]
|
||||
}
|
||||
|
||||
export const task_type:Iconfig = {
|
||||
fetchFn: apiTaskTypeLists,
|
||||
dictData:"superior_category",
|
||||
serchList: [
|
||||
{
|
||||
label: '任务名称',
|
||||
value: "unit_name"
|
||||
},
|
||||
{
|
||||
label:"上级类别",
|
||||
value:'superior_sort',
|
||||
select:'superior_category'
|
||||
},
|
||||
],
|
||||
tableList: [
|
||||
{ dataid: "标识" },
|
||||
{ num: "任务编号" },
|
||||
{ name: "任务名称" },
|
||||
{ level: "任务级次" },
|
||||
{ remarks: "备注" },
|
||||
]
|
||||
}
|
||||
|
||||
export const consult_project:Iconfig = {
|
||||
fetchFn: apiConsultProjectLists,
|
||||
dictData:"",
|
||||
serchList: [
|
||||
{
|
||||
label: '项目名称',
|
||||
value: "project_name"
|
||||
},
|
||||
{
|
||||
label:"项目编号",
|
||||
value:'project_code',
|
||||
},
|
||||
],
|
||||
tableList: [
|
||||
{ project_name: "项目名称" },
|
||||
{ project_code: "项目编号" },
|
||||
{ company: "委托单位" },
|
||||
{ total_investment: "总投资" },
|
||||
{ contract: "关联合同" },
|
||||
{ engineering_status_text: "工程状态" },
|
||||
{ consult_type_text: "咨询类型" },
|
||||
{ supervision_department: "监管部门" },
|
||||
{ implementation_department: "实施部门" },
|
||||
{ project_manager: "项目负责人员" },
|
||||
]
|
||||
}
|
||||
|
||||
export const zjzx_invoice:Iconfig = {
|
||||
fetchFn: apiZjzxInvoiceLists,
|
||||
dictData:"zjzx_invoice_type",
|
||||
serchList: [
|
||||
{
|
||||
label: '开票编号',
|
||||
value: "invoice_code"
|
||||
},
|
||||
{
|
||||
label: '发票类型',
|
||||
value: "invoice_type",
|
||||
select:'zjzx_invoice_type'
|
||||
},
|
||||
{
|
||||
label:"开票单位名称",
|
||||
value:'apply_company',
|
||||
},
|
||||
],
|
||||
tableList: [
|
||||
{ project_name: "项目名称" },
|
||||
{ invoice_code: "开票编号" },
|
||||
{ invoice_type_text: "发票类型" },
|
||||
{ apply_amount: "开票申请金额" },
|
||||
|
||||
]
|
||||
}
|
||||
export const consult_project: Iconfig = {
|
||||
fetchFn: apiConsultProjectLists,
|
||||
dictData: "",
|
||||
serchList: [
|
||||
{
|
||||
label: "项目名称",
|
||||
value: "project_name",
|
||||
},
|
||||
{
|
||||
label: "项目编号",
|
||||
value: "project_code",
|
||||
},
|
||||
],
|
||||
tableList: [
|
||||
{ project_name: "项目名称" },
|
||||
{ project_code: "项目编号" },
|
||||
{ company: "委托单位" },
|
||||
{ total_investment: "总投资" },
|
||||
{ contract: "关联合同" },
|
||||
{ engineering_status_text: "工程状态" },
|
||||
{ consult_type_text: "咨询类型" },
|
||||
{ supervision_department: "监管部门" },
|
||||
{ implementation_department: "实施部门" },
|
||||
{ project_manager: "项目负责人员" },
|
||||
],
|
||||
};
|
||||
|
||||
export const zjzx_invoice: Iconfig = {
|
||||
fetchFn: apiZjzxInvoiceLists,
|
||||
dictData: "zjzx_invoice_type",
|
||||
serchList: [
|
||||
{
|
||||
label: "开票编号",
|
||||
value: "invoice_code",
|
||||
},
|
||||
{
|
||||
label: "发票类型",
|
||||
value: "invoice_type",
|
||||
select: "zjzx_invoice_type",
|
||||
},
|
||||
{
|
||||
label: "开票单位名称",
|
||||
value: "apply_company",
|
||||
},
|
||||
],
|
||||
tableList: [
|
||||
{ project_name: "项目名称" },
|
||||
{ invoice_code: "开票编号" },
|
||||
{ invoice_type_text: "发票类型" },
|
||||
{ apply_amount: "开票申请金额" },
|
||||
],
|
||||
};
|
||||
|
||||
export const subcontracting_contract: Iconfig = {
|
||||
fetchFn: apiSubcontractingContractLists,
|
||||
// dictData: "zjzx_invoice_type",
|
||||
serchList: [
|
||||
{
|
||||
label: "合同编号",
|
||||
value: "contract_no",
|
||||
},
|
||||
],
|
||||
tableList: [
|
||||
{ supplier_name: "供应商名称" },
|
||||
{ project_name: "项目名称" },
|
||||
{ contract_no: "合同编号" },
|
||||
{ contract_name: "合同名称" },
|
||||
{ signing_date: "签订日期" },
|
||||
{ contract_type: "合同类型" },
|
||||
{ contract_amount: "合同金额" },
|
||||
{ negotiation_amount: "洽商金额" },
|
||||
{ excluding_tax_amount: "不含税金额" },
|
||||
{ reality_contract_amount: "实际合同金额" },
|
||||
{ has_pay_amount: "已付款金额" },
|
||||
{ not_pay_amount: "未付款金额" },
|
||||
{ invoice_amount: "已开票金额" },
|
||||
{ not_invoice_amount: "未开票金额" },
|
||||
{ refund_amount: "已退款金额" },
|
||||
{ settlement_difference: "结算差异" },
|
||||
],
|
||||
};
|
||||
|
||||
export const supplier_tab: Iconfig = {
|
||||
fetchFn: apisupplierLists,
|
||||
serchList: [
|
||||
{
|
||||
label: "联系人",
|
||||
value: "contacts",
|
||||
},
|
||||
{
|
||||
label: "建档人",
|
||||
value: "create_user_name",
|
||||
},
|
||||
{
|
||||
label: "供应商编码",
|
||||
value: "supplier_code",
|
||||
},
|
||||
],
|
||||
tableList: [
|
||||
{ create_user_name: "建档人" },
|
||||
{ supplier_code: "供应商编码" },
|
||||
{ supplier_name: "供应商名称" },
|
||||
{ brand_category: "品牌类别" },
|
||||
{ supplier_group: "供应商分组" },
|
||||
{ supplier_category: "供应商分类" },
|
||||
{ supplier_grade: "供应商等级" },
|
||||
{ contacts: "联系人" },
|
||||
{ contacts_sex: "性别" },
|
||||
{ phone: "电话号码" },
|
||||
],
|
||||
};
|
||||
|
||||
import { apiProcurementContractLists } from "@/api/procurement_contract";
|
||||
export const procurement_contract: Iconfig = {
|
||||
fetchFn: apiProcurementContractLists,
|
||||
serchList: [
|
||||
{
|
||||
label: "合同编号",
|
||||
value: "contract_no",
|
||||
},
|
||||
],
|
||||
tableList: [
|
||||
{ supplier_name: "供应商名称" },
|
||||
{ project_name: "项目名称" },
|
||||
{ contract_name: "合同名称" },
|
||||
{ contract_type: "合同类型" },
|
||||
{ signing_date: "签订日期" },
|
||||
{ contract_amount: "合同金额" },
|
||||
{ has_pay_amount: "已付款金额" },
|
||||
{ has_invoice_amount: "已开票金额" },
|
||||
{ not_pay_amount: "未付款金额" },
|
||||
{ not_invoice_amount: "未开票金额" },
|
||||
{ refund_amount: "退款金额" },
|
||||
{ has_storage_num: "已入库数量" },
|
||||
{ not_storage_num: "未入库数量" },
|
||||
{ num: "数量" },
|
||||
],
|
||||
};
|
||||
|
@ -1,210 +0,0 @@
|
||||
<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="160px">
|
||||
<el-descriptions :column="3" title="基本信息" border>
|
||||
<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_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.contract_amount }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="期次" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.period_text }}</el-descriptions-item>
|
||||
<el-descriptions-item label="税率(%)" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.tax_rate_text }}</el-descriptions-item>
|
||||
<el-descriptions-item label="发票类型" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.invoice_type_text }}</el-descriptions-item>
|
||||
<el-descriptions-item label="开票金额(含税)" label-align="left" align="left" label-class-name="my-label">
|
||||
{{
|
||||
formData.amount_including_tax }}</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="开票金额(税额)" label-align="left" align="left" label-class-name="my-label"> {{ formData.industry_text }}</el-descriptions-item> -->
|
||||
<el-descriptions-item label="开票内容" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.content }}</el-descriptions-item>
|
||||
<el-descriptions-item label="发票编号" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.invoice_no }}</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;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri"
|
||||
target="_blank">文件{{ index + 1 }} 查看</a>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
暂无文件
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
</el-descriptions>
|
||||
<el-descriptions :column="3" title="客户开票信息" border style="margin: 20px 0;">
|
||||
<el-descriptions-item label="开票公司名称" label-align="left" align="left" label-class-name="my-label">{{
|
||||
formData.invoicing_company_name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="纳税人识别号" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.taxpayer_identification_number }}</el-descriptions-item>
|
||||
<el-descriptions-item label="开户银行" label-align="left" align="left" label-class-name="my-label">{{
|
||||
formData.deposit_bank }}</el-descriptions-item>
|
||||
<el-descriptions-item label="账号" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.bank_accnout }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="开户地址及电话" label-align="left" align="left" label-class-name="my-label">
|
||||
{{ formData.address_phone }}
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</el-descriptions>
|
||||
<el-descriptions :column="3" title="发票邮寄信息" border style="margin: 20px 0;">
|
||||
<el-descriptions-item label="收票地址" label-align="left" align="left" label-class-name="my-label">{{
|
||||
formData.receiving_address }}</el-descriptions-item>
|
||||
<el-descriptions-item label="联系人" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.contacts }}</el-descriptions-item>
|
||||
<el-descriptions-item label="联系电话" label-align="left" align="left" label-class-name="my-label">{{
|
||||
formData.phone }}</el-descriptions-item>
|
||||
<el-descriptions-item label="邮寄时间" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.mailing_type }}</el-descriptions-item>
|
||||
<el-descriptions-item label="邮寄方式" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.mailing_type }}</el-descriptions-item>
|
||||
<el-descriptions-item label="邮寄单号" label-align="left" align="left" label-class-name="my-label">
|
||||
{{ formData.mailing_no }}
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</el-descriptions>
|
||||
<flowProcess v-if="!formData?.approve_id || formData.approve_check_status == 4" :flows="flows"
|
||||
:submitApi="apiInvoicingRequestsApprove" :id="formData?.id" @off="handleClose">
|
||||
</flowProcess>
|
||||
<flowDetail v-else :approve_id="formData?.approve_id" @off="handleClose" />
|
||||
<!-- import { apiInvoicingRequestsApprove, apiInvoicingRequestsFlows } from '@/api/flowSet.ts'
|
||||
// 获取审批流程
|
||||
const flows = ref([])
|
||||
const getbidDocumentExaminationFlows = async () => {
|
||||
if (formData?.approve_id) return
|
||||
let res = await apisubcontracting_contract_negotiationFlows()
|
||||
flows.value = res
|
||||
} -->
|
||||
|
||||
</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 { apiInvoicingRequestsApprove, apiInvoicingRequestsFlows } from '@/api/flowSet.ts'
|
||||
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 formData = reactive({
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
// 获取详情
|
||||
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)
|
||||
}
|
||||
Object.assign(formData, data)
|
||||
getbidDocumentExaminationFlows()
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiCustomDetail({
|
||||
id: formData.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
popupRef.value?.close()
|
||||
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = () => {
|
||||
popupRef.value?.open()
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
// 获取审批流程
|
||||
const flows = ref([])
|
||||
const getbidDocumentExaminationFlows = async () => {
|
||||
if (formData?.approve_id) return
|
||||
let res = await apiInvoicingRequestsFlows()
|
||||
flows.value = res
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.tit {
|
||||
font-size: 1.2em;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
:deep(.my-label) {
|
||||
width: 150px;
|
||||
}
|
||||
</style>
|
118
src/views/InvoicingRequests/detail.js
Normal file
118
src/views/InvoicingRequests/detail.js
Normal file
@ -0,0 +1,118 @@
|
||||
const detailConfig = {
|
||||
title: "开票申请",
|
||||
config: [
|
||||
{
|
||||
label: "合同编号",
|
||||
value: "contract_code"
|
||||
},
|
||||
{
|
||||
label: "合同名称",
|
||||
value: "contract_name"
|
||||
},
|
||||
{
|
||||
label: "项目名称",
|
||||
value: "project_name"
|
||||
},
|
||||
{
|
||||
label: "项目编码",
|
||||
value: "project_code"
|
||||
},
|
||||
{
|
||||
label: "客户名称",
|
||||
value: "custom_name"
|
||||
},
|
||||
{
|
||||
label: "开票日期",
|
||||
value: "invoicing_date"
|
||||
},
|
||||
{
|
||||
label: "合同金额",
|
||||
value: "contract_amount"
|
||||
},
|
||||
{
|
||||
label: "期次",
|
||||
value: "period_text"
|
||||
},
|
||||
{
|
||||
label: "税率",
|
||||
value: "tax_rate_text"
|
||||
},
|
||||
{
|
||||
label: "发票类型",
|
||||
value: "invoice_type_text"
|
||||
},
|
||||
|
||||
{
|
||||
label: "开票金额(含税)",
|
||||
value: "invoicing_amount"
|
||||
},
|
||||
{
|
||||
label: "开票内容",
|
||||
value: "content",
|
||||
column: 1
|
||||
},
|
||||
{
|
||||
label: "发票编号",
|
||||
value: "invoice_no"
|
||||
},
|
||||
|
||||
{
|
||||
label: "开票公司名称",
|
||||
value: "invoicing_company_name"
|
||||
},
|
||||
{
|
||||
label: "纳税人识别号",
|
||||
value: "taxpayer_identification_number"
|
||||
},
|
||||
{
|
||||
label: "开户银行",
|
||||
value: "deposit_bank"
|
||||
},
|
||||
{
|
||||
label: "账号",
|
||||
value: "bank_accnout"
|
||||
},
|
||||
{
|
||||
label: "开户地址及电话",
|
||||
value: "address_phone"
|
||||
},
|
||||
{
|
||||
label: "收票地址",
|
||||
value: "receiving_address"
|
||||
},
|
||||
{
|
||||
label: "联系人",
|
||||
value: "contacts"
|
||||
},
|
||||
|
||||
{
|
||||
label: "联系电话",
|
||||
value: "phone"
|
||||
},
|
||||
{
|
||||
label: "邮寄时间",
|
||||
value: "mailing_time"
|
||||
},
|
||||
{
|
||||
label: "邮寄方式",
|
||||
value: "mailing_type"
|
||||
},
|
||||
{
|
||||
label: "邮寄单号",
|
||||
value: "mailing_no"
|
||||
},
|
||||
{
|
||||
label: "备注",
|
||||
value: "remark",
|
||||
column: 1
|
||||
},
|
||||
{
|
||||
label: "附件",
|
||||
value: "annex",
|
||||
column: 1
|
||||
|
||||
},
|
||||
],
|
||||
|
||||
}
|
||||
export default detailConfig;
|
@ -1,109 +0,0 @@
|
||||
|
||||
<template>
|
||||
<div class="detail-popup">
|
||||
<popup ref="popupRef" title="开票申请详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData">
|
||||
<el-descriptions :column="3" title="房子出租" border>
|
||||
<el-descriptions-item label="开票公司名称" label-align="left">
|
||||
{{ formData.invoicing_company_name }}萨达撒旦发射点发射
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="开票公司名称" label-align="left">
|
||||
{{ formData.invoicing_company_name }}萨达撒旦发射点发射点发射点大师傅士大夫都是
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="开票公司名称" label-align="left">
|
||||
{{ formData.invoicing_company_name }}点发射点大师傅士大夫都是
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="开票公司名称" label-align="left">
|
||||
{{ formData.invoicing_company_name }}点发
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="开票公司名称" label-align="left">
|
||||
{{ formData.invoicing_company_name }}点发点发射点大师傅士大夫都是点发射点大师傅士大夫都是
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="开票公司名称" label-align="left">
|
||||
{{ formData.invoicing_company_name }}点发点发射点大师傅士大夫都是
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions :column="3" title="空闲土地出租" border>
|
||||
<el-descriptions-item label="开票公司名称" label-align="left">
|
||||
{{ formData.invoicing_company_name }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions :column="3" title="农副产品出售" border>
|
||||
<el-descriptions-item label="开票公司名称" label-align="left">
|
||||
{{ formData.invoicing_company_name }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions :column="3" title="空闲资产出租/出售" border>
|
||||
<el-descriptions-item label="开票公司名称" label-align="left">
|
||||
{{ formData.invoicing_company_name }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions :column="3" title="房屋装饰建设" border>
|
||||
<el-descriptions-item label="开票公司名称" label-align="left">
|
||||
{{ formData.invoicing_company_name }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="customdetail">
|
||||
|
||||
import type { FormInstance } from 'element-plus'
|
||||
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
|
||||
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
Object.assign(formData, data)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
popupRef.value?.close()
|
||||
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = () => {
|
||||
popupRef.value?.open()
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.tit {
|
||||
font-size: 1.2em;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
|
||||
@close="handleClose">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||
<el-card>
|
||||
<template #header>
|
||||
@ -38,8 +37,8 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票日期" prop="invoicing_date"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.invoicing_date" clearable
|
||||
type="date" value-format="YYYY-MM-DD" placeholder="选择开票日期">
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.invoicing_date" clearable type="date"
|
||||
value-format="YYYY-MM-DD" placeholder="选择开票日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -53,8 +52,8 @@
|
||||
<el-form-item label="期次" prop="period"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
||||
<el-select class="flex-1" v-model="formData.period" clearable placeholder="请选择期次">
|
||||
<el-option v-for="(item, index) in dictData.pay_period" :key="index"
|
||||
:label="item.name" :value="parseInt(item.value)" />
|
||||
<el-option v-for="(item, index) in dictData.pay_period" :key="index" :label="item.name"
|
||||
:value="parseInt(item.value)" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -62,15 +61,14 @@
|
||||
<el-form-item label="税率" prop="tax_rate">
|
||||
|
||||
<el-select class="flex-1" v-model="formData.tax_rate" clearable placeholder="请选择税率">
|
||||
<el-option v-for="(item, index) in dictData.tax_rate" :key="index"
|
||||
:label="item.name" :value="parseInt(item.value)" />
|
||||
<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-form-item label="发票类型" prop="contacts">
|
||||
<el-select class="flex-1" v-model="formData.invoice_type" clearable
|
||||
placeholder="请选择发票类型">
|
||||
<el-select class="flex-1" v-model="formData.invoice_type" clearable placeholder="请选择发票类型">
|
||||
<el-option v-for="(item, index) in dictData.invoice_type" :key="index"
|
||||
:label="item.name" :value="parseInt(item.value)" />
|
||||
</el-select>
|
||||
@ -105,26 +103,7 @@
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="附件">
|
||||
<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>
|
||||
|
||||
<uploadAnnex :formData="formData" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -192,14 +171,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="[{ validator: checkPhone, trigger: 'blur' }]">
|
||||
<el-input v-model="formData.phone" clearable placeholder="请输入联系电话" />
|
||||
</el-form-item>
|
||||
</el-col> <el-col :span="8">
|
||||
<el-form-item label="邮寄时间" prop="mailing_time">
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.mailing_time" clearable
|
||||
type="date" value-format="YYYY-MM-DD" placeholder="选择邮寄时间">
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.mailing_time" clearable type="date"
|
||||
value-format="YYYY-MM-DD" placeholder="选择邮寄时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -254,21 +232,9 @@ const custom_name = ref('')
|
||||
const next = () => {
|
||||
if (active.value++ > 3) active.value = 0
|
||||
}
|
||||
// 上传文件
|
||||
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 checkPhone = (rule: any, value: any, callback: (arg0: Error) => any) => {
|
||||
|
||||
@ -288,11 +254,6 @@ let invoicing_amount_daxie = computed(() => {
|
||||
})
|
||||
|
||||
|
||||
// 删除上传的文件
|
||||
const delFileFn = (index: number) => {
|
||||
formDataannex.splice(index, 1)
|
||||
}
|
||||
|
||||
|
||||
let props = defineProps({
|
||||
project: Object
|
||||
@ -328,7 +289,7 @@ const customEvent1 = (e: any) => {
|
||||
};
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑项目表' : '新增项目表'
|
||||
return mode.value == 'edit' ? '编辑开票申请' : '新增开票申请'
|
||||
})
|
||||
|
||||
// 表单数据
|
||||
@ -370,19 +331,6 @@ 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)
|
||||
|
||||
}
|
||||
|
||||
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
|
@ -53,7 +53,7 @@
|
||||
<el-table-column label="开票金额(含税)" prop="invoicing_amount" show-overflow-tooltip />
|
||||
<el-table-column label="开票金额(非税)" prop="amount_including_tax" show-overflow-tooltip />
|
||||
<el-table-column label="税率(%)" prop="tax_rate" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="160" fixed="right">
|
||||
<el-table-column label="操作" width="160" fixed="right" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/edit']" type="primary" link
|
||||
@click="handleEdit(row)">
|
||||
@ -64,7 +64,7 @@
|
||||
删除
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/detail']" link
|
||||
@click="handledetail(row)">
|
||||
@click="handleDetail(row.id)">
|
||||
详情
|
||||
</el-button>
|
||||
</template>
|
||||
@ -76,7 +76,7 @@
|
||||
</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" />
|
||||
<detailPage v-if="showDetail" ref="detailRef" @close="showEdit = false" :detailConfig="detailConfig" :column="2" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -87,22 +87,17 @@ import { apiinvoiceapplyLists, apiinvoiceapplyDelete, apiinvoiceapplyDetail } fr
|
||||
import { apiContractSearch } from '@/api/contract'
|
||||
import { apiProjectSearch } from '@/api/project'
|
||||
import { apiCustomSearch } from '@/api/custom'
|
||||
const protype = reactive([])
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
import DetailPopup from './detail.vue'
|
||||
import { useRoute } from "vue-router";
|
||||
const route = useRoute()
|
||||
import detailConfig from './detail'
|
||||
|
||||
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
const detailRef = ref('')
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false)
|
||||
|
||||
const showDtail = ref(false)
|
||||
|
||||
const list = ref([])
|
||||
const list1 = ref([])
|
||||
const showDetail = ref(false)
|
||||
const route = useRoute()
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
@ -152,10 +147,10 @@ const handleDelete = async (id: number | any[]) => {
|
||||
await apiinvoiceapplyDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
//详情
|
||||
const handledetail = async (data: any) => {
|
||||
let res = await apiinvoiceapplyDetail({ id: data.id })
|
||||
showDtail.value = true
|
||||
// 详情
|
||||
const handleDetail = async (id: any) => {
|
||||
let res = await apiinvoiceapplyDetail({ id })
|
||||
showDetail.value = true
|
||||
await nextTick()
|
||||
detailRef.value?.open()
|
||||
detailRef.value?.setFormData(res)
|
||||
|
@ -1,8 +1,7 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
|
||||
@close="handleClose">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8">
|
||||
@ -70,8 +69,8 @@
|
||||
<el-form-item label="付款性质" prop="payment_nature"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-select class="flex-1" v-model="formData.payment_nature" clearable placeholder="请选择付款性质">
|
||||
<el-option v-for="(item, index) in dictData.payment_natrue" :key="index"
|
||||
:label="item.name" :value="parseInt(item.value)" />
|
||||
<el-option v-for="(item, index) in dictData.payment_natrue" :key="index" :label="item.name"
|
||||
:value="parseInt(item.value)" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -94,16 +93,15 @@
|
||||
<el-form-item label="开票状态" prop="invoice_status"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-select class="flex-1" v-model="formData.invoice_status" clearable placeholder="请选择开票状态">
|
||||
<el-option v-for="(item, index) in dictData.invoice_status" :key="index"
|
||||
:label="item.name" :value="parseInt(item.value)" />
|
||||
<el-option v-for="(item, index) in dictData.invoice_status" :key="index" :label="item.name"
|
||||
:value="parseInt(item.value)" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="本次申请金额" prop="amount"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="formData.amount" @input="amountinput" clearable
|
||||
placeholder="请输入本次申请金额" />
|
||||
<el-input v-model="formData.amount" @input="amountinput" clearable placeholder="请输入本次申请金额" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@ -125,22 +123,7 @@
|
||||
<el-col :span="24">
|
||||
|
||||
<el-form-item label="附件">
|
||||
<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>
|
||||
<uploadAnnex :formData="formData"></uploadAnnex>
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
@ -173,8 +156,8 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="账户编码" prop="bank_account_info"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="formData.bank_account_info.account_sn" @click="showDialog4 = true"
|
||||
readonly clearable placeholder="请输入收款账号" />
|
||||
<el-input v-model="formData.bank_account_info.account_sn" @click="showDialog4 = true" readonly
|
||||
clearable placeholder="请输入收款账号" />
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
@ -241,14 +224,23 @@
|
||||
import customDialog from '@/components/custom-dialog/index.vue'
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
// import procurementDialog from '@/components/procurement/index.vue'
|
||||
import suppliertable from '@/components/supplier/index.vue'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
|
||||
|
||||
|
||||
import suppliertable from '@/components/supplier/index.vue'
|
||||
import subcontractingDialog from '@/components/procurementsubcontracting_selector/index.vue'
|
||||
import subcontracting from '@/components/procurementsubcontracting_selector/subcontracting.vue'
|
||||
import paylistDialog from '@/components/paylist/index.vue'
|
||||
const active = ref(0)
|
||||
import bankaccountDialog from '@/components/bankaccount/index.vue'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import { paymentapplyAdd, paymentapplyEdit, paymentapplyDetail } from '@/api/paymentrequest'
|
||||
import { toChinesNum } from "@/utils/util";
|
||||
import { getAllProjectTypes } from '@/api/projecttype'
|
||||
@ -258,7 +250,6 @@ 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 formDataannex = reactive([])
|
||||
const contract_name = ref('')
|
||||
@ -270,26 +261,7 @@ const project_amount = ref('')
|
||||
const contract_no = ref('')
|
||||
const custom_name = ref('')
|
||||
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)
|
||||
}
|
||||
let props = defineProps({
|
||||
project: Object
|
||||
})
|
||||
@ -410,19 +382,6 @@ 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)
|
||||
|
||||
}
|
||||
|
||||
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
@ -451,9 +410,7 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.annex = formDataannex.map((item: any) => item.uri)
|
||||
}
|
||||
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData }
|
||||
mode.value == 'edit'
|
||||
|
@ -1,8 +1,7 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
|
||||
@close="handleClose">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
|
||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||
<el-row :gutter="10">
|
||||
@ -94,43 +93,27 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
|
||||
<el-form-item label="附件">
|
||||
<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>
|
||||
|
||||
<uploadAnnex :formData="formData"></uploadAnnex>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-dialog v-model="showDialog" title="选择供应商" width="70%">
|
||||
<supplier @customEvent="customEvent" :project_id="project?.id || ''"></supplier>
|
||||
<dialogTable :config="supplier_tab" :query="{ project_id: project?.id || '' }"
|
||||
@customEvent="customEvent">
|
||||
</dialogTable>
|
||||
</el-dialog>
|
||||
<div v-if="formData.contract_cate == 1 && showDialog1">
|
||||
<el-dialog v-model="showDialog1" title="选择采购合同" width="70%">
|
||||
<subcontractingDialog @customEvent="customEvent1" :supplier_id="formData.supplier_id">
|
||||
</subcontractingDialog>
|
||||
<dialogTable :config="procurement_contract" :query="{ supplier_id: formData?.supplier_id || '' }"
|
||||
@customEvent="customEvent1" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
<div v-if="formData.contract_cate == 2 && showDialog1">
|
||||
<el-dialog v-model="showDialog1" title="选择分包合同" width="70%">
|
||||
<subcontracting @customEvent="customEvent1" :supplier_id="formData.supplier_id">
|
||||
</subcontracting>
|
||||
<dialogTable :config="subcontracting_contract" :query="{ supplier_id: formData?.supplier_id || '' }"
|
||||
@customEvent="customEvent1" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</el-form>
|
||||
@ -143,9 +126,7 @@
|
||||
import customDialog from '@/components/custom-dialog/index.vue'
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import supplier from '@/components/supplier/index.vue'
|
||||
import subcontractingDialog from '@/components/procurementsubcontracting_selector/index.vue'
|
||||
import subcontracting from '@/components/procurementsubcontracting_selector/subcontracting.vue'
|
||||
import { supplier_tab, procurement_contract, subcontracting_contract } from "@/components/dialogTable/dialogTableConfig"
|
||||
import { paymentplanAdd, paymentplanEdit, paymentplanDetail } from '@/api/paymentplan'
|
||||
import { toChinesNum } from "@/utils/util";
|
||||
import { getAllProjectTypes } from '@/api/projecttype'
|
||||
@ -169,26 +150,7 @@ const contract_no = ref('')
|
||||
const supplier_name = ref('')
|
||||
const supplier_code = ref('')
|
||||
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)
|
||||
}
|
||||
const props = defineProps({
|
||||
project: Object
|
||||
})
|
||||
@ -268,18 +230,6 @@ 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)
|
||||
|
||||
}
|
||||
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
@ -307,9 +257,6 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.annex = formDataannex.map((item: any) => item.uri)
|
||||
}
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData }
|
||||
mode.value == 'edit'
|
||||
|
@ -34,8 +34,7 @@
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button v-perms="['refund.refund/delete']" :disabled="!selectData.length"
|
||||
@click="handleDelete(selectData)">
|
||||
<el-button v-perms="['refund.refund/delete']" :disabled="!selectData.length" @click="handleDelete(selectData)">
|
||||
删除
|
||||
</el-button>
|
||||
|
||||
@ -52,15 +51,12 @@
|
||||
<el-table-column label="状态" prop="status_text" show-overflow-tooltip />
|
||||
<el-table-column label="已付款" prop="has_payment_amount" show-overflow-tooltip />
|
||||
<el-table-column label="未付款" prop="not_payment_amount" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="150" fixed="right">
|
||||
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['refund.refund/edit']" type="primary" link @click="handleEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-perms="['refund.refund/delete']" type="danger" link
|
||||
@click="handleDelete(row.id)">
|
||||
<el-button v-perms="['refund.refund/delete']" type="danger" link @click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button v-perms="['refund.refund/detail']" link @click="handledetail(row)">
|
||||
|
@ -1,8 +1,7 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
|
||||
@close="handleClose">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
|
||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||
<el-row :gutter="10">
|
||||
@ -84,8 +83,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="发票金额大写" prop="invoice_amount_daxie">
|
||||
<el-input v-model="formData.invoice_amount_daxie" clearable disabled
|
||||
placeholder="请输入金额大写" />
|
||||
<el-input v-model="formData.invoice_amount_daxie" clearable disabled placeholder="请输入金额大写" />
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -103,17 +101,14 @@
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="税额" prop="tax"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-form-item label="税额" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="formData.tax" disabled clearable placeholder="请输入税额" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="不含税金额" prop="amount_excluding_tax"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="formData.amount_excluding_tax" clearable disabled
|
||||
placeholder="请输入不含税金额" />
|
||||
<el-form-item label="不含税金额" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="formData.amount_excluding_tax" clearable disabled placeholder="请输入不含税金额" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@ -130,29 +125,9 @@
|
||||
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="24">
|
||||
|
||||
<el-form-item label="附件">
|
||||
<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>
|
||||
|
||||
<uploadAnnex :formData="formData"></uploadAnnex>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -197,7 +172,6 @@ import type { PropType } from 'vue'
|
||||
import configs from "@/config"
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
const { dictData } = useDictData('invoice_type,contract_type,tax_rate')
|
||||
|
||||
const protype = reactive([])
|
||||
const base_url = configs.baseUrl + configs.urlPrefix
|
||||
@ -212,21 +186,7 @@ const contract_no = ref('')
|
||||
const supplier_name = ref('')
|
||||
const supplier_code = ref('')
|
||||
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 checkPhone = (rule: any, value: any, callback: (arg0: Error) => any) => {
|
||||
if (value && !/^1\d{10}$/.test(value)) {
|
||||
@ -237,11 +197,9 @@ const checkPhone = (rule: any, value: any, callback: (arg0: Error) => any) => {
|
||||
}
|
||||
|
||||
|
||||
// 删除上传的文件
|
||||
const delFileFn = (index: number) => {
|
||||
formDataannex.splice(index, 1)
|
||||
}
|
||||
|
||||
const props = defineProps({
|
||||
dictData: Object,
|
||||
project: Object
|
||||
})
|
||||
if (props.project) {
|
||||
@ -280,14 +238,14 @@ const customEvent1 = (e: any) => {
|
||||
|
||||
//获取税率Name
|
||||
const getTaxValue = (value) => {
|
||||
let i = dictData.tax_rate.findIndex((item) => item.value == value)
|
||||
return (dictData.tax_rate[i]?.name / 100) || 0
|
||||
let i = props.dictData.tax_rate.findIndex((item) => item.value == value)
|
||||
return (props.dictData.tax_rate[i]?.name / 100) || 0
|
||||
}
|
||||
|
||||
//监听输入
|
||||
const amountinput = (e) => {
|
||||
formData.tax = formData.invoice_amount * getTaxValue(formData.invoice_tax_rate)
|
||||
formData.amount_excluding_tax = formData.invoice_amount - formData.tax
|
||||
formData.tax = (formData.invoice_amount * getTaxValue(formData.invoice_tax_rate)).toFixed(2)
|
||||
formData.amount_excluding_tax = (formData.invoice_amount - formData.tax).toFixed(2)
|
||||
formData.invoice_amount_daxie = toChinesNum(formData.invoice_amount)
|
||||
}
|
||||
|
||||
@ -313,7 +271,7 @@ const formData = reactive({
|
||||
amount_excluding_tax: "",
|
||||
receipt_date: "",
|
||||
remark: "",
|
||||
annex: "",
|
||||
annex: [],
|
||||
contract_cate: 1,
|
||||
approve_detail: {}
|
||||
})
|
||||
@ -326,15 +284,6 @@ const formRules = reactive<any>({
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
if (data.return_desc && data.return_desc.length > 0) {
|
||||
const arry1 = data.return_desc.map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
}
|
||||
if (data.invoice_amount_daxie) {
|
||||
toChinesNum(data.invoice_amount_daxie)
|
||||
}
|
||||
@ -364,16 +313,8 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.return_desc = formDataannex.map((item: any) => item.uri).toString()
|
||||
}
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
||||
const data = { ...formData }
|
||||
|
||||
|
||||
|
||||
mode.value == 'edit'
|
||||
? await apifinancereceiptEdit(data)
|
||||
: await apifinancereceiptAdd(data)
|
||||
|
@ -28,8 +28,7 @@
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button v-perms="['refund.refund/delete']" :disabled="!selectData.length"
|
||||
@click="handleDelete(selectData)">
|
||||
<el-button v-perms="['refund.refund/delete']" :disabled="!selectData.length" @click="handleDelete(selectData)">
|
||||
删除
|
||||
</el-button>
|
||||
|
||||
@ -57,8 +56,7 @@
|
||||
<el-button v-perms="['refund.refund/edit']" type="primary" link @click="handleEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-perms="['refund.refund/delete']" type="danger" link
|
||||
@click="handleDelete(row.id)">
|
||||
<el-button v-perms="['refund.refund/delete']" type="danger" link @click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button v-perms="['refund.refund/detail']" link @click="handledetail(row)">
|
||||
@ -116,6 +114,7 @@ const handleSelectionChange = (val: any[]) => {
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData('invoice_type,contract_type,tax_rate')
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apifinancereceiptLists,
|
||||
|
@ -1,8 +1,7 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
|
||||
@close="handleClose">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
|
||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||
<el-row :gutter="10">
|
||||
@ -55,10 +54,9 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="收款性质" prop="contacts">
|
||||
<el-select class="flex-1" v-model="formData.collection_type" clearable
|
||||
placeholder="请选择收款性质">
|
||||
<el-option v-for="(item, index) in dictData.collection_type" :key="index"
|
||||
:label="item.name" :value="parseInt(item.value)" />
|
||||
<el-select class="flex-1" v-model="formData.collection_type" clearable placeholder="请选择收款性质">
|
||||
<el-option v-for="(item, index) in dictData.collection_type" :key="index" :label="item.name"
|
||||
:value="parseInt(item.value)" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -76,8 +74,8 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票状态" prop="contacts">
|
||||
<el-select class="flex-1" v-model="formData.invoice_status" clearable placeholder="请选择开票状态">
|
||||
<el-option v-for="(item, index) in dictData.invoice_status" :key="index"
|
||||
:label="item.name" :value="parseInt(item.value)" />
|
||||
<el-option v-for="(item, index) in dictData.invoice_status" :key="index" :label="item.name"
|
||||
:value="parseInt(item.value)" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -112,49 +110,32 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
|
||||
<el-form-item label="附件">
|
||||
<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>
|
||||
|
||||
<uploadAnnex :formData="formData"></uploadAnnex>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div style="margin: 20px 0;">付款银行信息</div>
|
||||
<div style="margin: 20px 0;">付款银行信息
|
||||
</div>
|
||||
|
||||
<el-row :gutter="10">
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="账户编码" @click="showDialog2 = true">
|
||||
<el-input v-model="account_sn" readonly clearable placeholder="请选择收款账户" />
|
||||
<el-input v-model="account_sn" readonly clearable placeholder="请选择收款账户" class="!flex flex-1" />
|
||||
<toolTip content="可在财务管理--银行账户--银行账户添加"></toolTip>
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开户银行" prop="deposit_bank">
|
||||
<el-input v-model="deposit_bank" clearable disabled placeholder="请输入开户银行" />
|
||||
<el-input v-model="deposit_bank" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="账号" prop="account">
|
||||
<el-input v-model="account" clearable disabled placeholder="请输入开票公司名称" />
|
||||
<el-input v-model="account" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -171,7 +152,6 @@
|
||||
<pendingDialog @customEvent="customEvent3" :contract_id="formData.contract_id"></pendingDialog>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
</el-form>
|
||||
</popup>
|
||||
|
||||
@ -211,26 +191,6 @@ const account = ref('')
|
||||
const deposit_bank = ref('')
|
||||
|
||||
|
||||
// 上传文件
|
||||
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)
|
||||
}
|
||||
let props = defineProps({
|
||||
project: Object
|
||||
})
|
||||
@ -315,19 +275,6 @@ 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)
|
||||
|
||||
}
|
||||
|
||||
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
@ -359,13 +306,7 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.annex = formDataannex.map((item: any) => item.uri)
|
||||
}
|
||||
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
||||
const data = { ...formData }
|
||||
mode.value == 'edit'
|
||||
? await apireturnedrecordEdit(data)
|
||||
|
@ -44,7 +44,7 @@
|
||||
<el-table-column label="付款方式" prop="pay_type" show-overflow-tooltip />
|
||||
<el-table-column label="收款性质" prop="collection_type" show-overflow-tooltip />
|
||||
<el-table-column label="收款人" prop="receiver" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="150" fixed="right">
|
||||
<el-table-column label="操作" width="150" fixed="right" align="center">
|
||||
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['recordsPayment.recordsPayment/edit']" type="primary" link
|
||||
@ -55,8 +55,7 @@
|
||||
@click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button v-perms="['recordsPayment.recordsPayment/detail']" link
|
||||
@click="handledetail(row)">
|
||||
<el-button v-perms="['recordsPayment.recordsPayment/detail']" link @click="handledetail(row)">
|
||||
详情
|
||||
</el-button>
|
||||
|
||||
|
@ -1,15 +1,13 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
|
||||
@close="handleClose">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||
<el-row :gutter="10">
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同名称" prop="contract_name">
|
||||
<el-input v-model="contract_name" clearable placeholder="点击选择合同"
|
||||
@click="showDialog1 = true" />
|
||||
<el-input v-model="contract_name" clearable placeholder="点击选择合同" @click="showDialog1 = true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@ -81,26 +79,8 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
|
||||
<el-form-item label="附件">
|
||||
<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>
|
||||
|
||||
<uploadAnnex :formData="formData"></uploadAnnex>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -123,12 +103,13 @@
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="账户编码" prop="collection_account">
|
||||
<el-input v-model="formData.bank_account_info.account_sn" @click="showDialog = true"
|
||||
readonly clearable placeholder="请输入收款账号" />
|
||||
<el-input v-model="formData.bank_account_info.account_sn" @click="showDialog = true" readonly
|
||||
clearable placeholder="请输入收款账号" class="!flex flex-1" />
|
||||
<toolTip content="可在财务管理--银行账户--银行账户添加"></toolTip>
|
||||
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开户银行" prop="collection_bank">
|
||||
<el-input v-model="formData.bank_account_info.deposit_bank" clearable readonly
|
||||
@ -293,20 +274,6 @@ 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)
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
@ -319,7 +286,6 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
project_amount.value = data.contract_amount
|
||||
contract_name.value = data.contract_name;
|
||||
contract_no.value = data.contract_code
|
||||
|
||||
bank_account_no.value = data.bank_account_info.account;
|
||||
|
||||
}
|
||||
@ -333,9 +299,6 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.annex = formDataannex
|
||||
}
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData }
|
||||
mode.value == 'edit'
|
||||
|
@ -28,8 +28,7 @@
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button v-perms="['refund.refund/delete']" :disabled="!selectData.length"
|
||||
@click="handleDelete(selectData)">
|
||||
<el-button v-perms="['refund.refund/delete']" :disabled="!selectData.length" @click="handleDelete(selectData)">
|
||||
删除
|
||||
</el-button>
|
||||
|
||||
@ -46,15 +45,13 @@
|
||||
<el-table-column label="退款金额" prop="amount" show-overflow-tooltip />
|
||||
<el-table-column label="退款方式" prop="refund_type" show-overflow-tooltip />
|
||||
<el-table-column label="退款人" prop="refund_user" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="150" fixed="right">
|
||||
<el-table-column label="操作" width="150" fixed="right" align="center">
|
||||
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['refund.refund/edit']" type="primary" link @click="handleEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-perms="['refund.refund/delete']" type="danger" link
|
||||
@click="handleDelete(row.id)">
|
||||
<el-button v-perms="['refund.refund/delete']" type="danger" link @click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button v-perms="['refund.refund/detail']" link @click="handledetail(row)">
|
||||
|
@ -1,8 +1,7 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
|
||||
@close="handleClose">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
|
||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||
<el-row :gutter="10">
|
||||
@ -70,37 +69,13 @@
|
||||
<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="annex">
|
||||
<el-input v-model="formData.annex" clearable placeholder="请输入附件" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="附件">
|
||||
<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>
|
||||
|
||||
<uploadAnnex :formData="formData"></uploadAnnex>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
|
||||
<el-dialog v-model="showDialog1" title="选择合同" width="70%">
|
||||
<contractDialog @customEvent="customEvent1"></contractDialog>
|
||||
</el-dialog>
|
||||
@ -116,7 +91,7 @@ import customDialog from '@/components/custom-dialog/index.vue'
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import salescontractDialog from '@/components/salescontract/index.vue'
|
||||
//暂时使用项目合同弹窗
|
||||
// 暂时使用项目合同弹窗 ???
|
||||
import contractDialog from '@/components/contract/index.vue'
|
||||
import personnelselector from '@/components/personnelselector/index.vue'
|
||||
import { apireturnedAdd, apireturnedEdit, apireturnedDetail } from '@/api/remittance'
|
||||
@ -139,32 +114,6 @@ const contract_no = ref('')
|
||||
const custom_name = ref('')
|
||||
const return_name = ref('')
|
||||
|
||||
// 上传文件
|
||||
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 { dictData } = useDictData('return_status,pay_period,contract_type')
|
||||
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
@ -215,18 +164,6 @@ 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)
|
||||
|
||||
}
|
||||
|
||||
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
|
@ -1,34 +1,50 @@
|
||||
<template>
|
||||
<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="apiContractSearch" />
|
||||
</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="custom_id">
|
||||
<selectRemote :formData="queryParams" model="custom_id" :api="apiCustomSearch" />
|
||||
</el-form-item>
|
||||
<el-form-item label="期次" prop="project_name">
|
||||
<el-select class="flex-1" v-model="queryParams.period" clearable placeholder="请选择期次">
|
||||
<el-option v-for="(item, index) in dictData.pay_period" :key="index" :label="item.name"
|
||||
:value="parseInt(item.value)" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="回款状态" prop="return_status">
|
||||
<el-select class="flex-1" v-model="queryParams.return_status" clearable placeholder="请选择回款状态">
|
||||
<el-option v-for="(item, index) in dictData.return_status" :key="index" :label="item.name"
|
||||
:value="parseInt(item.value)" />
|
||||
</el-select>
|
||||
</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="apireturnedLists" :params="queryParams"
|
||||
:page-size="pager.size" />
|
||||
</el-form-item>
|
||||
<el-form class="mb-[-16px]" :model="queryParams" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="关联合同" prop="contract_id">
|
||||
<selectRemote :formData="queryParams" model="contract_id" :api="apiContractSearch" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="所属项目" prop="project_id">
|
||||
<selectRemote :formData="queryParams" model="project_id" :api="apiProjectSearch" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="客户名称" prop="custom_id">
|
||||
<selectRemote :formData="queryParams" model="custom_id" :api="apiCustomSearch" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="期次" prop="project_name">
|
||||
<el-select class="flex-1" v-model="queryParams.period" clearable placeholder="请选择期次">
|
||||
<el-option v-for="(item, index) in dictData.pay_period" :key="index" :label="item.name"
|
||||
:value="parseInt(item.value)" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="回款状态" prop="return_status">
|
||||
<el-select class="flex-1 !fle" v-model="queryParams.return_status" clearable
|
||||
placeholder="请选择回款状态">
|
||||
<el-option v-for="(item, index) in dictData.return_status" :key="index" :label="item.name"
|
||||
:value="parseInt(item.value)" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<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="apireturnedLists" :params="queryParams"
|
||||
:page-size="pager.size" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
@ -58,7 +74,6 @@
|
||||
<el-table-column label="已回款" prop="has_return_amount" show-overflow-tooltip />
|
||||
<el-table-column label="未回款" prop="not_return_amount" show-overflow-tooltip />
|
||||
<el-table-column label="回款责任人" prop="return_duty" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="150" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['remittance.remittance/edit']" type="primary" link
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,20 +1,20 @@
|
||||
<template>
|
||||
<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-button v-perms="['contract.subcontracting_contract/add']" type="primary" @click="handleAdd">
|
||||
<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-button v-perms="['contract.subcontracting_contract/add']" type="primary" @click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
@ -24,117 +24,120 @@
|
||||
@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="project_name" 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_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="project_features" show-overflow-tooltip />
|
||||
<el-table-column label="单位" prop="unit" show-overflow-tooltip />
|
||||
<el-table-column label="税率(%)" prop="tax_rate_text" 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_including_tax" show-overflow-tooltip />
|
||||
<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)">
|
||||
|
||||
<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="project_name" 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_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="project_features" show-overflow-tooltip />
|
||||
<el-table-column label="单位" prop="unit" show-overflow-tooltip />
|
||||
<el-table-column label="税率(%)" prop="tax_rate_text" 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_including_tax" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="160" fixed="right" align="center">
|
||||
<template #default="{ 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 v-perms="['contract.subcontracting_contract/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>
|
||||
<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>
|
||||
</el-button>-->
|
||||
<el-button v-perms="['contract.subcontracting_contract/delete']" type="danger" link
|
||||
@click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button v-perms="['contract.subcontracting_contract/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>
|
||||
<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="subcontractingContractLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiSubcontractingContractDetailLists, apiSubcontractingContractDetailDelete, apiSubcontractingContractDetailDetail } from '@/api/subcontracting_contract_detail'
|
||||
import { apiSubcontractingContractSearch } from '@/api/subcontracting_contract'
|
||||
import feedback from '@/utils/feedback'
|
||||
import { usePaging } from "@/hooks/usePaging";
|
||||
import { useDictData } from "@/hooks/useDictOptions";
|
||||
import {
|
||||
apiSubcontractingContractDetailLists,
|
||||
apiSubcontractingContractDetailDelete,
|
||||
apiSubcontractingContractDetailDetail,
|
||||
} from "@/api/subcontracting_contract_detail";
|
||||
import { apiSubcontractingContractSearch } from "@/api/subcontracting_contract";
|
||||
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>>()
|
||||
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 showEdit = ref(false);
|
||||
const showDtail = ref(false);
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
contract_id: ''
|
||||
})
|
||||
contract_id: "",
|
||||
});
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
const selectData = ref<any[]>([]);
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id)
|
||||
}
|
||||
selectData.value = val.map(({ id }) => id);
|
||||
};
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData('contract_type,account_period,tax_rate,pay_type,pay_period ')
|
||||
const { dictData } = useDictData(
|
||||
"contract_type,account_period,tax_rate,pay_type,pay_period "
|
||||
);
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiSubcontractingContractDetailLists,
|
||||
params: queryParams
|
||||
})
|
||||
fetchFun: apiSubcontractingContractDetailLists,
|
||||
params: queryParams,
|
||||
});
|
||||
|
||||
// 添加
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('add')
|
||||
}
|
||||
showEdit.value = true;
|
||||
await nextTick();
|
||||
editRef.value?.open("add");
|
||||
};
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
let res = await apiSubcontractingContractDetailDetail({ id: data.id })
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(res)
|
||||
}
|
||||
let res = await apiSubcontractingContractDetailDetail({ 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 apiSubcontractingContractDetailDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
await feedback.confirm("确定要删除?");
|
||||
await apiSubcontractingContractDetailDelete({ id });
|
||||
getLists();
|
||||
};
|
||||
const handleDetail = async (data: any) => {
|
||||
let res = await apiSubcontractingContractDetailDetail({ id: data.id })
|
||||
showDtail.value = true
|
||||
await nextTick()
|
||||
detailRef.value?.open()
|
||||
detailRef.value?.setFormData(res)
|
||||
}
|
||||
let res = await apiSubcontractingContractDetailDetail({ id: data.id });
|
||||
showDtail.value = true;
|
||||
await nextTick();
|
||||
detailRef.value?.open();
|
||||
detailRef.value?.setFormData(res);
|
||||
};
|
||||
|
||||
|
||||
|
||||
getLists()
|
||||
getLists();
|
||||
</script>
|
||||
|
@ -1,286 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="120px" label-position="left">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="合同编号" prop="field102">
|
||||
<el-input v-model="formData.field102" placeholder="点击选择合同编号" :disabled='true' clearable
|
||||
suffix-icon='el-icon-search' :style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="签订日期" prop="field106">
|
||||
<el-date-picker v-model="formData.field106" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
|
||||
:style="{ width: '100%' }" placeholder="请输入签约日期" clearable
|
||||
:disabled='true'></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="供应商" prop="field102">
|
||||
<el-input v-model="formData.field102" placeholder="系统自动填写" :disabled='true' clearable
|
||||
suffix-icon='el-icon-search' :style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="供应商编码" prop="field102">
|
||||
<el-input v-model="formData.field102" placeholder="系统自动填写" :disabled='true' clearable
|
||||
suffix-icon='el-icon-search' :style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目名称" prop="field103">
|
||||
<el-input v-model="formData.field103" placeholder="点击选择项目名称" :disabled='true' clearable
|
||||
suffix-icon='el-icon-search' :style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目编码" prop="field102">
|
||||
<el-input v-model="formData.field102" placeholder="系统自动填写" :disabled='true' clearable
|
||||
suffix-icon='el-icon-search' :style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="治商编号" prop="field110">
|
||||
<el-input v-model="formData.field110" placeholder="系统自动获取" :disabled='true' clearable
|
||||
:style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="治商单位名称" prop="field109">
|
||||
<el-input v-model="formData.field109" placeholder="请输入治商单位名称" clearable
|
||||
:style="{ width: '100%' }">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="治商金额" prop="field111">
|
||||
<el-input v-model="formData.field111" placeholder="请输入治商金额" clearable
|
||||
:style="{ width: '100%' }">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="治商类别" prop="field135">
|
||||
<el-radio-group v-model="formData.field135" size="medium">
|
||||
<el-radio v-for="(item, index) in field135Options" :key="index" :label="item.value"
|
||||
:disabled="item.disabled">{{ item.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="治商质保金额" prop="field138">
|
||||
<el-input v-model="formData.field138" placeholder="请输入治商质保金额" clearable
|
||||
:style="{ width: '100%' }">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="治商质保到期时间" prop="field139" label-width="130px">
|
||||
<el-input v-model="formData.field139" placeholder="请输入治商质保到期时间" clearable
|
||||
:style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="治商内容" prop="field142">
|
||||
<el-input v-model="formData.field142" type="textarea" placeholder="请输入治商内容"
|
||||
:autosize="{ minRows: 4, maxRows: 4 }" :style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="具体说明" prop="field143">
|
||||
<el-input v-model="formData.field143" type="textarea" placeholder="请输入具体说明"
|
||||
:autosize="{ minRows: 4, maxRows: 4 }" :style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="签证报价表" prop="field144">
|
||||
<el-upload ref="field144" :file-list="field144fileList" :action="field144Action"
|
||||
:before-upload="field144BeforeUpload">
|
||||
<el-button size="small" type="primary" icon="el-icon-upload">点击上传</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="治商依据" prop="field145">
|
||||
<el-upload ref="field145" :file-list="field145fileList" :action="field145Action"
|
||||
:before-upload="field145BeforeUpload">
|
||||
<el-button size="small" type="primary" icon="el-icon-upload">点击上传</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item size="large">
|
||||
<el-button type="primary" @click="submitForm">提交</el-button>
|
||||
<el-button @click="resetForm">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
components: {},
|
||||
props: [],
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
field101: undefined,
|
||||
field102: undefined,
|
||||
field103: undefined,
|
||||
field104: undefined,
|
||||
field107: undefined,
|
||||
field105: undefined,
|
||||
field106: undefined,
|
||||
field108: undefined,
|
||||
field109: undefined,
|
||||
field110: undefined,
|
||||
field111: undefined,
|
||||
field135: 1,
|
||||
field136: undefined,
|
||||
field137: undefined,
|
||||
field138: undefined,
|
||||
field139: undefined,
|
||||
field140: undefined,
|
||||
field141: undefined,
|
||||
field142: undefined,
|
||||
field143: undefined,
|
||||
field144: null,
|
||||
field145: null,
|
||||
},
|
||||
rules: {
|
||||
field101: [{
|
||||
required: true,
|
||||
message: '点击选择合同',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
field102: [{
|
||||
required: true,
|
||||
message: '点击选择合同编号',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
field103: [{
|
||||
required: true,
|
||||
message: '点击选择项目名称',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
field104: [{
|
||||
required: true,
|
||||
message: '系统自动填写',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
field107: [{
|
||||
required: true,
|
||||
message: '系统自动填写',
|
||||
trigger: 'change'
|
||||
}],
|
||||
field105: [{
|
||||
required: true,
|
||||
message: '系统自动获取',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
field106: [{
|
||||
required: true,
|
||||
message: '请输入签约日期',
|
||||
trigger: 'change'
|
||||
}],
|
||||
field108: [{
|
||||
required: true,
|
||||
message: '点击选择',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
field109: [{
|
||||
required: true,
|
||||
message: '请输入治商单位名称',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
field110: [],
|
||||
field111: [{
|
||||
required: true,
|
||||
message: '请输入治商金额',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
field135: [],
|
||||
field136: [],
|
||||
field137: [],
|
||||
field138: [],
|
||||
field139: [],
|
||||
field140: [],
|
||||
field141: [],
|
||||
field142: [],
|
||||
field143: [],
|
||||
},
|
||||
field144Action: 'https://jsonplaceholder.typicode.com/posts/',
|
||||
field144fileList: [],
|
||||
field145Action: 'https://jsonplaceholder.typicode.com/posts/',
|
||||
field145fileList: [],
|
||||
field107Options: [{
|
||||
"label": "选项一",
|
||||
"value": 1
|
||||
}, {
|
||||
"label": "选项二",
|
||||
"value": 2
|
||||
}],
|
||||
field108Options: [{
|
||||
"label": "总价合同",
|
||||
"value": 1
|
||||
}, {
|
||||
"label": "清单计价",
|
||||
"value": 2
|
||||
}],
|
||||
field135Options: [{
|
||||
"label": "设计变更",
|
||||
"value": 1
|
||||
}, {
|
||||
"label": "现场变更",
|
||||
"value": 2
|
||||
}, {
|
||||
"label": "补充协议",
|
||||
"value": 3
|
||||
}],
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() { },
|
||||
mounted() { },
|
||||
methods: {
|
||||
submitForm() {
|
||||
this.$refs['elForm'].validate(valid => {
|
||||
if (!valid) return
|
||||
// TODO 提交表单
|
||||
})
|
||||
},
|
||||
resetForm() {
|
||||
this.$refs['elForm'].resetFields()
|
||||
},
|
||||
field144BeforeUpload(file) {
|
||||
let isRightSize = file.size / 1024 / 1024 < 2
|
||||
if (!isRightSize) {
|
||||
this.$message.error('文件大小超过 2MB')
|
||||
}
|
||||
return isRightSize
|
||||
},
|
||||
field145BeforeUpload(file) {
|
||||
let isRightSize = file.size / 1024 / 1024 < 2
|
||||
if (!isRightSize) {
|
||||
this.$message.error('文件大小超过 2MB')
|
||||
}
|
||||
return isRightSize
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.el-upload__tip {
|
||||
line-height: 1.2;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,43 +1,51 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
|
||||
@close="handleClose">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="160px" :rules="formRules">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同编号" prop="subcontracting_contract_id" @click="showDialog = true"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
||||
<el-form-item label="合同编号" prop="subcontracting_contract_id" @click="showDialog = true" :rules="[
|
||||
{ required: true, message: '不可为空', trigger: 'change' },
|
||||
]">
|
||||
<el-input v-model="contract_no" clearable placeholder="请输入合同编号" />
|
||||
</el-form-item> </el-col>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="供应商名称" prop="subcontracting_contract_id">
|
||||
<el-input v-model="supplier_name" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item> </el-col>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="供应商编码" prop="subcontracting_contract_id">
|
||||
<el-input v-model="supplier_code" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item> </el-col>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目名称" prop="subcontracting_contract_id"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
||||
<el-form-item label="项目名称" prop="subcontracting_contract_id" :rules="[
|
||||
{ required: true, message: '不可为空', trigger: 'change' },
|
||||
]">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item> </el-col>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目编码" prop="subcontracting_contract_id"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
||||
<el-form-item label="项目编码" prop="subcontracting_contract_id" :rules="[
|
||||
{ required: true, message: '不可为空', trigger: 'change' },
|
||||
]">
|
||||
<el-input v-model="project_code" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item> </el-col>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="洽商编号" prop="negotiation_no">
|
||||
<el-input v-model="formData.negotiation_no" clearable disabled placeholder="系统自动生成" />
|
||||
</el-form-item> </el-col>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="洽商单名称" prop="negotiation_name">
|
||||
<el-input v-model="formData.negotiation_name" clearable placeholder="请输入洽商单名称" />
|
||||
</el-form-item> </el-col>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="签订日期" prop="sign_date">
|
||||
@ -47,8 +55,9 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="洽商金额" prop="negotiation_amount"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
||||
<el-form-item label="洽商金额" prop="negotiation_amount" :rules="[
|
||||
{ required: true, message: '不可为空', trigger: 'change' },
|
||||
]">
|
||||
<el-input v-model="formData.negotiation_amount" clearable placeholder="请输入合同金额" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -65,7 +74,6 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="洽商类别" prop="negotiation_type">
|
||||
<el-radio-group v-model="formData.negotiation_type" placeholder="请选择付款方式">
|
||||
@ -74,166 +82,102 @@
|
||||
{{ item.name }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item> </el-col>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="洽商质保金额" prop="warranty_amount">
|
||||
<el-input v-model="formData.warranty_amount" clearable placeholder="请输入不含税金额" />
|
||||
</el-form-item> </el-col>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="洽商质保到期时间" prop="warranty_expire_date">
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.warranty_expire_date" clearable
|
||||
value-format="YYYY-MM-DD" placeholder="选择洽商质保到期时间">
|
||||
</el-date-picker>
|
||||
</el-form-item> </el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="签证报价表">
|
||||
<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" :key="index"
|
||||
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-col :span="24">
|
||||
<el-form-item label="洽商依据">
|
||||
<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_five" ref="upload">
|
||||
<el-button type="primary">
|
||||
上传
|
||||
</el-button>
|
||||
</el-upload>
|
||||
|
||||
<div>
|
||||
<div v-for="(item, index) in formDataannex1" :key="index"
|
||||
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="delFileFn1(index)">x</span>
|
||||
</div>
|
||||
</div>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="签证报价表">
|
||||
<uploadAnnex :formData="formData" value="negotiation_quotation">
|
||||
</uploadAnnex>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="洽商依据">
|
||||
<uploadAnnex :formData="formData" value="negotiation_basis">
|
||||
</uploadAnnex>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
<el-dialog v-model="showDialog" title="选择分包合同" width="70%">
|
||||
<procurementTable @customEvent="customEvent" :project_id="project?.id || ''"></procurementTable>
|
||||
<dialogTable :config="subcontracting_contract" :query="{ project_id: project?.id || '' }"
|
||||
@customEvent="customEvent">
|
||||
</dialogTable>
|
||||
</el-dialog>
|
||||
</popup>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="procurementContractEdit">
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import procurementTable from '@/components/procurement/index.vue'
|
||||
import { apinegotiationAdd, apinegotiationEdit, apinegotiationDetail } from '@/api/subcontractor'
|
||||
const { dictData } = useDictData('negotiation_type')
|
||||
import type { FormInstance } from "element-plus";
|
||||
import Popup from "@/components/popup/index.vue";
|
||||
import { useDictData } from "@/hooks/useDictOptions";
|
||||
import {
|
||||
apinegotiationAdd,
|
||||
apinegotiationEdit,
|
||||
apinegotiationDetail,
|
||||
} from "@/api/subcontractor";
|
||||
import { subcontracting_contract } from "@/components/dialogTable/dialogTableConfig"
|
||||
|
||||
|
||||
|
||||
const { dictData } = useDictData("negotiation_type");
|
||||
let props = defineProps({
|
||||
project: Object
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const mode = ref('add')
|
||||
const showDialog = ref(false)
|
||||
const project_name = ref('')
|
||||
const project_code = ref('')
|
||||
const formDataannex = reactive([])
|
||||
const formDataannex1 = reactive([])
|
||||
const supplier_name = ref('')
|
||||
const supplier_code = ref('')
|
||||
const contract_no = ref('')
|
||||
const tableData = reactive([])
|
||||
const tableData1 = reactive([])
|
||||
import feedback from '@/utils/feedback'
|
||||
import configs from "@/config"
|
||||
const base_url = configs.baseUrl + configs.urlPrefix
|
||||
project: Object,
|
||||
});
|
||||
const emit = defineEmits(["success", "close"]);
|
||||
const formRef = shallowRef<FormInstance>();
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>();
|
||||
const mode = ref("add");
|
||||
const showDialog = ref(false);
|
||||
const project_name = ref("");
|
||||
const project_code = ref("");
|
||||
const formDataannex = reactive([]);
|
||||
const formDataannex1 = reactive([]);
|
||||
const supplier_name = ref("");
|
||||
const supplier_code = ref("");
|
||||
const contract_no = ref("");
|
||||
const tableData = reactive([]);
|
||||
const tableData1 = reactive([]);
|
||||
import feedback from "@/utils/feedback";
|
||||
import configs from "@/config";
|
||||
const base_url = configs.baseUrl + configs.urlPrefix;
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
const userStore = useUserStore();
|
||||
// 上传文件
|
||||
const handleAvatarSuccess_four = (
|
||||
response,
|
||||
uploadFile
|
||||
) => {
|
||||
if (response.code == 0) {
|
||||
feedback.msgError(response.msg);
|
||||
return;
|
||||
}
|
||||
formDataannex.push(
|
||||
{ uri: response.data.uri, name: response.data.name }
|
||||
|
||||
);
|
||||
};
|
||||
// 删除上传的文件
|
||||
const delFileFn = (index: number) => {
|
||||
formDataannex.splice(index, 1)
|
||||
}
|
||||
// 上传文件
|
||||
const handleAvatarSuccess_five = (
|
||||
response,
|
||||
uploadFile
|
||||
) => {
|
||||
if (response.code == 0) {
|
||||
feedback.msgError(response.msg);
|
||||
return;
|
||||
}
|
||||
formDataannex1.push(
|
||||
{ uri: response.data.uri, name: response.data.name }
|
||||
|
||||
);
|
||||
};
|
||||
// 删除上传的文件
|
||||
const delFileFn1 = (index: number) => {
|
||||
formDataannex1.splice(index, 1)
|
||||
}
|
||||
|
||||
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑分包洽商' : '新增分包洽商'
|
||||
})
|
||||
return mode.value == "edit" ? "编辑分包洽商" : "新增分包洽商";
|
||||
});
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
subcontracting_contract_id: '1',
|
||||
negotiation_name: '',
|
||||
negotiation_no: '',
|
||||
negotiation_amount: '',
|
||||
negotiation_type: '',
|
||||
sign_date: '',
|
||||
warranty_amount: '',
|
||||
warranty_expire_date: '',
|
||||
negotiation_content: '',
|
||||
id: "",
|
||||
subcontracting_contract_id: "1",
|
||||
negotiation_name: "",
|
||||
negotiation_no: "",
|
||||
negotiation_amount: "",
|
||||
negotiation_type: "",
|
||||
sign_date: "",
|
||||
warranty_amount: "",
|
||||
warranty_expire_date: "",
|
||||
negotiation_content: "",
|
||||
negotiation_quotation: [],
|
||||
negotiation_basis: [],
|
||||
negotiation_detail: "",
|
||||
})
|
||||
});
|
||||
|
||||
const customEvent = (e: any) => {
|
||||
contract_no.value = e.contract_no;
|
||||
@ -242,100 +186,65 @@ const customEvent = (e: any) => {
|
||||
formData.sign_date = e.signing_date;
|
||||
project_name.value = e.project_name;
|
||||
formData.subcontracting_contract_id = e.id;
|
||||
project_code.value = e.project_code
|
||||
project_code.value = e.project_code;
|
||||
showDialog.value = false;
|
||||
|
||||
};
|
||||
if (props.project) {
|
||||
project_name.value = props.project.name
|
||||
project_code.value = props.project.project_code
|
||||
|
||||
project_name.value = props.project.name;
|
||||
project_code.value = props.project.project_code;
|
||||
}
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
|
||||
})
|
||||
|
||||
const formRules = reactive<any>({});
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
if (data.negotiation_quotation.length > 0) {
|
||||
|
||||
const arry1 = data.negotiation_quotation.map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
}
|
||||
if (data.negotiation_basis.length > 0) {
|
||||
|
||||
const arry1 = data.negotiation_basis.map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex1, arry1)
|
||||
|
||||
}
|
||||
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
|
||||
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;
|
||||
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
formData[key] = data[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apinegotiationDetail({
|
||||
id: row.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
id: row.id,
|
||||
});
|
||||
setFormData(data);
|
||||
};
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.negotiation_quotation = formDataannex.map((item) => item.uri)
|
||||
}
|
||||
if (formDataannex1.length > 0) {
|
||||
formData.negotiation_basis = formDataannex1.map((item) => item.uri)
|
||||
}
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
await formRef.value?.validate();
|
||||
const data = { ...formData };
|
||||
mode.value == "edit"
|
||||
? await apinegotiationEdit(data)
|
||||
: await apinegotiationAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
}
|
||||
: await apinegotiationAdd(data);
|
||||
popupRef.value?.close();
|
||||
emit("success");
|
||||
};
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = 'add') => {
|
||||
mode.value = type
|
||||
popupRef.value?.open()
|
||||
}
|
||||
const open = (type = "add") => {
|
||||
mode.value = type;
|
||||
popupRef.value?.open();
|
||||
};
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
emit("close");
|
||||
};
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
getDetail,
|
||||
});
|
||||
</script>
|
||||
|
@ -52,19 +52,20 @@
|
||||
<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_expire_date" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="160" fixed="right">
|
||||
|
||||
<el-table-column label="操作" width="160" fixed="right" align='center'>
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['contract.subcontracting_contract_negotiation/edit']" type="primary"
|
||||
link @click="handleEdit(row)">
|
||||
<el-button v-perms="['contract.subcontracting_contract_negotiation/edit']" type="primary" link
|
||||
@click="handleEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-perms="['contract.subcontracting_contract_negotiation/delete']" type="danger"
|
||||
link @click="handleDelete(row.id)">
|
||||
<el-button v-perms="[
|
||||
'contract.subcontracting_contract_negotiation/delete',
|
||||
]" type="danger" link @click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button v-perms="['contract.subcontracting_contract_negotiation/detail']" link
|
||||
@click="handledetail(row)">
|
||||
<el-button v-perms="[
|
||||
'contract.subcontracting_contract_negotiation/detail',
|
||||
]" link @click="handledetail(row)">
|
||||
详情
|
||||
</el-button>
|
||||
</template>
|
||||
@ -81,78 +82,82 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="projectLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apinegotiationLists, apinegotiationDelete, apinegotiationDetail } from '@/api/subcontractor'
|
||||
import { apiSubcontractingContractSearch } from '@/api/subcontracting_contract'
|
||||
import { apiProjectSearch } 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>>()
|
||||
import { usePaging } from "@/hooks/usePaging";
|
||||
import { useDictData } from "@/hooks/useDictOptions";
|
||||
import {
|
||||
apinegotiationLists,
|
||||
apinegotiationDelete,
|
||||
apinegotiationDetail,
|
||||
} from "@/api/subcontractor";
|
||||
import { apiSubcontractingContractSearch } from "@/api/subcontracting_contract";
|
||||
import { apiProjectSearch } 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 showEdit = ref(false);
|
||||
const showDtail = ref(false);
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
negotiation_no: '',
|
||||
subcontracting_contract_id: '',
|
||||
negotiation_type: '',
|
||||
project_id: ''
|
||||
})
|
||||
negotiation_no: "",
|
||||
subcontracting_contract_id: "",
|
||||
negotiation_type: "",
|
||||
project_id: "",
|
||||
});
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
const selectData = ref<any[]>([]);
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id)
|
||||
}
|
||||
selectData.value = val.map(({ id }) => id);
|
||||
};
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData('negotiation_type')
|
||||
const { dictData } = useDictData("negotiation_type");
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apinegotiationLists,
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
|
||||
// 添加
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('add')
|
||||
}
|
||||
showEdit.value = true;
|
||||
await nextTick();
|
||||
editRef.value?.open("add");
|
||||
};
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
let res = await apinegotiationDetail({ id: data.id })
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(res)
|
||||
}
|
||||
let res = await apinegotiationDetail({ 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 apinegotiationDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
await feedback.confirm("确定要删除?");
|
||||
await apinegotiationDelete({ id });
|
||||
getLists();
|
||||
};
|
||||
const handledetail = async (data: any) => {
|
||||
let res = await apinegotiationDetail({ id: data.id })
|
||||
showDtail.value = true
|
||||
await nextTick()
|
||||
detailRef.value?.open()
|
||||
detailRef.value?.setFormData(res)
|
||||
}
|
||||
let res = await apinegotiationDetail({ id: data.id });
|
||||
showDtail.value = true;
|
||||
await nextTick();
|
||||
detailRef.value?.open();
|
||||
detailRef.value?.setFormData(res);
|
||||
};
|
||||
|
||||
import { useRoute } from "vue-router";
|
||||
const route = useRoute()
|
||||
const route = useRoute();
|
||||
if (route.query?.listId) {
|
||||
handledetail({ id: route.query.listId })
|
||||
handledetail({ id: route.query.listId });
|
||||
}
|
||||
getLists()
|
||||
getLists();
|
||||
</script>
|
||||
|
@ -66,7 +66,6 @@
|
||||
<el-table-column label="联系人" prop="contacts" show-overflow-tooltip />
|
||||
<el-table-column label="性别" prop="contacts_sex" show-overflow-tooltip />
|
||||
<el-table-column label="电话号码" prop="phone" 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="['bid.bid_bidding_decision/edit']" type="primary" link
|
||||
|
Loading…
x
Reference in New Issue
Block a user