From daf1b166e1c1870446e2fff6a695d194e5238a94 Mon Sep 17 00:00:00 2001 From: liyongde <1419499670@qq.com> Date: Tue, 17 Mar 2026 20:21:37 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E5=90=88=E5=90=8C=E6=A3=80=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/application/api/controller/Contract.php | 107 +- front/src/api/contract.js | 9 + .../src/views/contract-mgr/contractsearch.vue | 294 ++++- .../views/contract-mgr/operationcontract.vue | 1100 +++++++++-------- 4 files changed, 958 insertions(+), 552 deletions(-) diff --git a/back/application/api/controller/Contract.php b/back/application/api/controller/Contract.php index 419431d..ad2665a 100644 --- a/back/application/api/controller/Contract.php +++ b/back/application/api/controller/Contract.php @@ -239,7 +239,7 @@ class Contract extends Common if (!isset($param['contract_url']) || $param['contract_url'] == '') { $insert_info['contract_url'] = ''; } else { - $insert_info['contract_url'] = $param['cosssntract_url']; + $insert_info['contract_url'] = $param['contract_url']; // 同理,contract_file_name 也建议做存在性检查,避免同理报错 $insert_info['contract_file_name'] = isset($param['contract_file_name']) ? $param['contract_file_name'] : ''; } @@ -322,4 +322,109 @@ class Contract extends Common return $this->sendError('删除失败'); } } + + // 合同检索 + public function searchContracts() + { + $param = request()->param(); + + $currPage = isset($param['currPage']) ? $param['currPage'] : 1; + $pageSize = isset($param['pageSize']) ? $param['pageSize'] : 20; + + // 构建查询条件 + $where = ['del_time' => null]; + + // 时间范围筛选 + if (isset($param['start_date']) && !empty($param['start_date'])) { + $where['create_time'] = ['>=', $param['start_date']]; + } + if (isset($param['end_date']) && !empty($param['end_date'])) { + if (isset($where['create_time'])) { + $where['create_time'] = [ + ['>=', $param['start_date']], + ['<=', $param['end_date']] + ]; + } else { + $where['create_time'] = ['<=', $param['end_date']]; + } + } + + // 合同分类筛选 + if (isset($param['contract_category']) && $param['contract_category'] !== '' && $param['contract_category'] !== '0') { + $where['contract_category'] = $param['contract_category']; + } + + // 查询合同列表 + $contractList = db('contract_info') + ->where($where) + ->order('contract_id', 'desc') + ->page($currPage, $pageSize) + ->select(); + + // 遍历合同列表,补充关联信息 + foreach ($contractList as &$contract) { + // 获取合同类型名称 + if ($contract['contract_type']) { + $contractType = db('contract_type') + ->where('type_id', $contract['contract_type']) + ->field('type_name') + ->find(); + $contract['contract_type_name'] = $contractType ? $contractType['type_name'] : ''; + } else { + $contract['contract_type_name'] = ''; + } + + // 获取合同分类名称 + switch ($contract['contract_category']) { + case 1: + $contract['contract_category_name'] = '销售合同'; + break; + case 2: + $contract['contract_category_name'] = '销售技术协议'; + break; + case 3: + $contract['contract_category_name'] = '采购合同'; + break; + case 4: + $contract['contract_category_name'] = '采购及技术协议'; + break; + case 5: + $contract['contract_category_name'] = '其他'; + break; + default: + $contract['contract_category_name'] = ''; + } + + // 获取项目名称 + if ($contract['project_id']) { + $project = db('project_info') + ->where('project_id', $contract['project_id']) + ->field('project_name') + ->find(); + $contract['project_name'] = $project ? $project['project_name'] : ''; + } else { + $contract['project_name'] = ''; + } + + // 获取合作伙伴名称 + if ($contract['partner_id']) { + $partner = db('partner_company') + ->where('company_id', $contract['partner_id']) + ->field('company_name') + ->find(); + $contract['partner_name'] = $partner ? $partner['company_name'] : ''; + } else { + $contract['partner_name'] = ''; + } + } + unset($contract); + + // 查询总记录数 + $total = db('contract_info')->where($where)->count(); + + $res['list'] = $contractList; + $res['total'] = $total; + + return $this->sendSuccess($res); + } } \ No newline at end of file diff --git a/front/src/api/contract.js b/front/src/api/contract.js index 48d4708..551d947 100644 --- a/front/src/api/contract.js +++ b/front/src/api/contract.js @@ -90,5 +90,14 @@ export default { method: 'post', data: param }) + }, + + // 合同检索 + searchContracts(param) { + return request({ + url: `/Contract/searchContracts`, + method: 'post', + data: param + }) } } diff --git a/front/src/views/contract-mgr/contractsearch.vue b/front/src/views/contract-mgr/contractsearch.vue index 66a8592..a2e9b37 100644 --- a/front/src/views/contract-mgr/contractsearch.vue +++ b/front/src/views/contract-mgr/contractsearch.vue @@ -20,47 +20,309 @@ value-format="yyyy-MM-dd" clearable/> - - + + - - + + + + 查询 + 重置 + + + + + + 合同列表 + 共 {{ total }} 条记录 + + + + + + + + + {{ scope.row.project_name || '-' }} + + + + + {{ scope.row.partner_name || '-' }} + + + + + ¥{{ scope.row.contract_price | currency }} + + + + + + {{ scope.row.contract_des || '-' }} + + + + + + 查看 + + - + + + + + + 暂无合同数据 + + + + + + + + + + + + + + + + + 该文件类型({{ fileExtension }})需要下载后查看 + + 立即下载 {{ fileExtension.toUpperCase() }} 文件 + + + From b6080e9d4b906a0da9493a5fa302ce3ab7c4f7d2 Mon Sep 17 00:00:00 2001 From: zhangzq Date: Wed, 18 Mar 2026 11:30:58 +0800 Subject: [PATCH 2/2] =?UTF-8?q?opt:=E4=BC=98=E5=8C=96=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=EF=BC=8C=E5=AE=A2=E6=88=B7=E7=9B=B8=E5=85=B3=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/README.md | 2 +- front/index.html | 2 +- front/src/api/hr.js | 9 +- .../src/views/components/ProjectBasicInfo.vue | 473 +++++++++++------- .../src/views/components/ProjectImplInfo.vue | 6 +- front/src/views/components/Story.vue | 2 +- front/src/views/customer-mgr/customerlist.vue | 38 +- front/src/views/hr-mgr/stafflist.vue | 181 ++++--- front/src/views/login/index.vue | 2 +- front/src/views/system-mgr/userList.vue | 9 +- 10 files changed, 448 insertions(+), 276 deletions(-) diff --git a/front/README.md b/front/README.md index d0ff7d7..6baf907 100644 --- a/front/README.md +++ b/front/README.md @@ -1,4 +1,4 @@ - +npm diff --git a/front/index.html b/front/index.html index 8e15938..425cb6b 100644 --- a/front/index.html +++ b/front/index.html @@ -5,7 +5,7 @@ - Warehouse Management System + 上海诺力智能科技有限公司 diff --git a/front/src/api/hr.js b/front/src/api/hr.js index aec01aa..f9ff670 100644 --- a/front/src/api/hr.js +++ b/front/src/api/hr.js @@ -45,6 +45,13 @@ export default { data: param }) }, + getStaffPage(param) { + return request({ + url: `/Hr/GetStaffPage`, + method: "post", + data: param + }); + }, GetStaffTypeList() { return request({ url: `/Hr/GetStaffTypeList`, @@ -73,7 +80,7 @@ export default { data: param }) }, - + GetOperationDeptStaff() { return request({ diff --git a/front/src/views/components/ProjectBasicInfo.vue b/front/src/views/components/ProjectBasicInfo.vue index 89cee69..8021d48 100644 --- a/front/src/views/components/ProjectBasicInfo.vue +++ b/front/src/views/components/ProjectBasicInfo.vue @@ -5,39 +5,62 @@ 项目基础信息 - 编辑 + 编辑 项目介绍:{{ - project_info.project_intro }} + project_info.project_intro }} - - {{ project_info.company_name }} - {{ project_info.project_name }} - {{ project_info.project_state_desp }} - 启动 + {{ project_info.company_name }} + {{ project_info.project_name }} + {{ project_info.project_state_desp }} + 启动 - {{ project_info.create_time }} - {{ project_info.sale_manager }} - 编辑 + {{ project_info.create_time }} + {{ project_info.sale_name }} + 编辑 - {{ project_info.project_manager }} - 编辑 + {{ project_info.project_manager }} + 编辑 - {{ project_info.project_members }} - 编辑 + {{ project_info.project_members }} + 编辑 - - 查看 + + 查看 - - 查看 + + 查看 - - 项目合同 - 设备资料 - 技术协议 - 会议纪要 - 投标文件 + + 项目合同 + 设备资料 + 技术协议 + 会议纪要 + 投标文件 - - 查看 + + 查看 - - 查看 + + 查看 @@ -77,92 +108,162 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 不支持的文件类型 - + - - + @@ -173,13 +274,15 @@ - + - - + @@ -190,13 +293,15 @@ - + - - + @@ -207,27 +312,29 @@ - + - + - + - + - - + - - + @@ -237,20 +344,27 @@ - + - - - + + - - + @@ -268,16 +382,15 @@ import project from '@/api/project' import contract from '@/api/contract' import hr from '@/api/hr' import user from '@/api/user' -import Contract from './Contract.vue'; -import ExternalMember from './ExternalMember.vue'; +import Contract from './Contract.vue' +import ExternalMember from './ExternalMember.vue' import Materials from '@/views/components/Materials.vue' -import SupplierInfo from './SupplierInfo.vue'; -import ProjectPlan from './ProjectPlan.vue'; -import BidInfo from '@/views/components/BidInfo.vue'; +import SupplierInfo from './SupplierInfo.vue' +import ProjectPlan from './ProjectPlan.vue' +import BidInfo from '@/views/components/BidInfo.vue' export default { name: 'ProjectBasicInfo', - props: ['project_id', 'edit_support'], components: { Contract, ExternalMember, @@ -286,6 +399,7 @@ export default { BidInfo, ProjectPlan }, + props: ['project_id', 'edit_support'], data() { return { update_view: false, @@ -343,141 +457,135 @@ export default { addProjectMember() { this.dialogVisibleAddMember = true - this.editProject.project_members = []; + this.editProject.project_members = [] if (this.project_info['involve_members'] != '') { - this.editProject.project_members = this.project_info['involve_members'].split(',').map(staff_id => parseInt(staff_id, 10)); - + this.editProject.project_members = this.project_info['involve_members'].split(',').map(staff_id => parseInt(staff_id, 10)) } }, - //获取项目部所有员工信息 + // 获取项目部所有员工信息 get_project_dept_member_list() { user.GetProjectDeptStaffList().then(response => { this.dept_member_list = response.data.data - console.log(this.dept_member_list); + console.log(this.dept_member_list) }) }, setProjectManager() { - this.dialogVisibleSetManager = true; + this.dialogVisibleSetManager = true }, setSaleManager() { - this.dialogVisibleSetSaleManager = true; + this.dialogVisibleSetSaleManager = true }, update_sub_component() { - this.update_view = true; - let that = this; + this.update_view = true + const that = this setTimeout(() => { - that.update_view = false; - }, 100); // 1000 毫秒后执行 + that.update_view = false + }, 100) // 1000 毫秒后执行 }, confirmSetManager() { - - var param = { project_id: this.project_id, involve_manager: this.editProject.project_manager }; + var param = { project_id: this.project_id, involve_manager: this.editProject.project_manager } console.log('---------------------------') console.log(param) project.UpdateProjectManager(param).then(response => { this.get_project_info(this.project_id) - this.$message({ type: 'success', message: '更新成功' }); - this.dialogVisibleSetManager = false; + this.$message({ type: 'success', message: '更新成功' }) + this.dialogVisibleSetManager = false }) }, confirmSaleManager() { - - var param = { project_id: this.project_id, sale_manager: this.editProject.sale_manager }; + var param = { project_id: this.project_id, sale_manager: this.editProject.sale_manager } console.log('---------------------------') console.log(param) project.UpdateProjectSaleManager(param).then(response => { this.get_project_info(this.project_id) - this.$message({ type: 'success', message: '更新成功' }); - this.dialogVisibleSetSaleManager = false; + this.$message({ type: 'success', message: '更新成功' }) + this.dialogVisibleSetSaleManager = false }) }, confirmAddMember() { - var param = { project_id: this.project_id, involve_members: this.editProject.project_members }; + var param = { project_id: this.project_id, involve_members: this.editProject.project_members } project.UpdateProjectMember(param).then(response => { this.get_project_info(this.project_id) this.dialogVisibleAddMember = false - this.$message({ type: 'success', message: '更新成功' }); + this.$message({ type: 'success', message: '更新成功' }) }) - }, confirmStartProject() { - if (this.editNode.members.length == 0) { - this.$message.warning('请选择项目组成员'); - return; + this.$message.warning('请选择项目组成员') + return } - if ('' == this.editNode.start_date) { - this.$message.warning('请选择项目启动时间'); - return; + if (this.editNode.start_date == '') { + this.$message.warning('请选择项目启动时间') + return } var project_id = this.project_id var param = { project_id: project_id, - //manager: this.editNode.manager, + // manager: this.editNode.manager, members: this.editNode.members, - start_date: this.editNode.start_date, - //tech_protocol: this.editNode.tech_protocol_url, + start_date: this.editNode.start_date + // tech_protocol: this.editNode.tech_protocol_url, - }; + } - console.log(param); + console.log(param) project.StartProject(param).then(response => { this.$message({ type: 'success', message: '添加成功' - }); + }) this.get_project_info(this.project_id) }).catch(error => { this.$message({ type: 'error', message: '添加失败,请重试' - }); - }); - this.dialogVisibleStartProject = false; + }) + }) + this.dialogVisibleStartProject = false }, get_project_state_list() { project.GetProjectStateList().then(response => { this.project_state_list = response.data.data - console.log(this.project_state_list); + console.log(this.project_state_list) }) }, editProjectInfo() { - this.dialogVisibleEditProject = true; - this.get_project_info(this.project_id); + this.dialogVisibleEditProject = true + this.get_project_info(this.project_id) }, get_project_info(project_id) { this.project_id = project_id - var param = { project_id: project_id }; + var param = { project_id: project_id } project.GetProjectInfo(param).then(response => { this.project_info = response.data.data - //从项目管理进入 + // 从项目管理进入 if (this.edit_support == false) { - //如果登录用户是项目经理,则有编辑项目基本信息的权限 - var login_user = localStorage.getItem('user_id'); + // 如果登录用户是项目经理,则有编辑项目基本信息的权限 + var login_user = localStorage.getItem('user_id') if (login_user == this.project_info.involve_manager) { this.edit_support = true - //不允许编辑项目经理 - this.allow_change_manager = false; + // 不允许编辑项目经理 + this.allow_change_manager = false } - } - else//从客户管理进入 + } else// 从客户管理进入 { - //允许编辑项目经理 - this.allow_change_manager = true; + // 允许编辑项目经理 + this.allow_change_manager = true } this.editProject = response.data.data @@ -488,47 +596,47 @@ export default { showProtocol() { this.dialogVisibleShowProtocol = true - this.update_sub_component(); + this.update_sub_component() }, showEquipment() { this.dialogVisibleShowEquipment = true - this.update_sub_component(); + this.update_sub_component() }, showReport() { this.dialogVisibleShowReport = true - this.update_sub_component(); + this.update_sub_component() }, showSupplier() { this.dialogVisibleShowSupplier = true - this.update_sub_component(); + this.update_sub_component() }, showBid() { this.dialogVisibleShowBid = true - this.update_sub_component(); + this.update_sub_component() }, showSummary() { this.dialogVisibleShowSummary = true - this.update_sub_component(); + this.update_sub_component() }, showPlan() { this.dialogVisibleShowPlan = true - this.update_sub_component(); + this.update_sub_component() }, showContract() { this.dialogVisibleShowContract = true - this.update_sub_component(); + this.update_sub_component() }, showExternalMember() { this.dialogVisibleShowExternalMember = true - this.update_sub_component(); + this.update_sub_component() }, // showProtocol() { @@ -539,25 +647,24 @@ export default { var param = { project_id: this.project_id, contract_type: 2 } contract.GetProjectContractList(param).then(response => { this.contract_info_list = response.data.data - console.log(this.contract_info_list); + console.log(this.contract_info_list) }) }, update_sub_component() { - this.update_view = true; - let that = this; + this.update_view = true + const that = this setTimeout(() => { - that.update_view = false; - }, 100); // 1000 毫秒后执行 + that.update_view = false + }, 100) // 1000 毫秒后执行 }, - showImg(row) { const url = process.env.BASE_WMS_FILE + row.contract_url - const ext = url.split('.').pop().toLowerCase(); + const ext = url.split('.').pop().toLowerCase() - console.log('-----------------------------------------'); - console.log(url); + console.log('-----------------------------------------') + console.log(url) if (ext === 'jpg' || ext === 'jpeg' || ext === 'png') { this.previewUrl = url @@ -570,16 +677,16 @@ export default { } else if (ext === '') { } else { - this.$message.success('不支持的文件类型'); + this.$message.success('不支持的文件类型') } this.dialogVisibleShowFile = true }, confirmEditProject() { if (this.editProject.project_name.trim() === '') { - this.$message.warning('请输入项目名称'); - return; + this.$message.warning('请输入项目名称') + return } - var project_id = this.project_id; + var project_id = this.project_id var param = { project_id: project_id, project_name: this.editProject.project_name, @@ -587,18 +694,18 @@ export default { project_number: this.editProject.project_number, project_state: this.editProject.project_state, create_time: this.editProject.create_time - }; + } - console.log(param); + console.log(param) project.EditProjectInfo(param).then(response => { this.$message({ type: 'success', message: '添加成功' - }); - this.get_project_info(this.project_id); - }); - this.dialogVisibleEditProject = false; + }) + this.get_project_info(this.project_id) + }) + this.dialogVisibleEditProject = false } } } diff --git a/front/src/views/components/ProjectImplInfo.vue b/front/src/views/components/ProjectImplInfo.vue index 81ad85f..0296750 100644 --- a/front/src/views/components/ProjectImplInfo.vue +++ b/front/src/views/components/ProjectImplInfo.vue @@ -38,7 +38,7 @@ - + @@ -118,7 +118,7 @@ export default { this.project_info = response.data.data }) }, - + update_sub_component() { this.update_view = true; let that = this; @@ -156,7 +156,7 @@ export default { //查看问题单 showDemand() { this.dialogVisibleShowDemand = true - this.update_sub_component() + this.update_sub_component() }, //查看项目实施购买清单 showPorShopping() { diff --git a/front/src/views/components/Story.vue b/front/src/views/components/Story.vue index d84dd60..baff609 100644 --- a/front/src/views/components/Story.vue +++ b/front/src/views/components/Story.vue @@ -50,7 +50,7 @@ 查看 - + diff --git a/front/src/views/customer-mgr/customerlist.vue b/front/src/views/customer-mgr/customerlist.vue index f617202..af35cc9 100644 --- a/front/src/views/customer-mgr/customerlist.vue +++ b/front/src/views/customer-mgr/customerlist.vue @@ -62,7 +62,9 @@ export default { data() { let id = 1; return { - supplier_type_list: [], + newPartner: {}, + dialogVisibleAddPartner: false, + supplier_type_list: [], update_view:false, defaultProps: { children: 'sub_type', @@ -88,6 +90,31 @@ export default { }, methods: { + confirmAddPartner() { + // this.newPartner.company_type = this.partner_type + //如果是供应商,需要设置供应商的服务类型 + if (this.partner_type == 4) { + this.newPartner.service_type = this.service_type + } + else { + this.newPartner.service_type = 0; + } + + partner.AddPartnerCompanyInfo(this.newPartner).then(response => { + this.$message({ + type: 'success', + message: '添加成功' + }); + //this.get_supplier_type_list(supplier_type) + }).catch(error => { + this.$message({ + type: 'error', + message: '添加失败,请重试' + }); + }); + // 关闭所有对话框 + this.dialogVisibleAddPartner = false; + }, openTreeMenu(event, data, node, target) { console.log(event, data, node, target) @@ -129,7 +156,14 @@ export default { that.update_view = false; }, 100); // 1000 毫秒后执行 }, - + addPartnerInfo() { + this.dialogVisibleAddPartner = true; + this.newPartner = { + company_name: '', + company_intro: '', + create_time: '' + } + }, handle_node_click(data, node) { this.currentNode = node; this.currentData = data; diff --git a/front/src/views/hr-mgr/stafflist.vue b/front/src/views/hr-mgr/stafflist.vue index bfb7e0a..69f7567 100644 --- a/front/src/views/hr-mgr/stafflist.vue +++ b/front/src/views/hr-mgr/stafflist.vue @@ -1,97 +1,118 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + - - - 删除 - - - - - - + + + 删除 + + + + + + + + - - - - - 不支持的文件类型 - + + + + + 不支持的文件类型 + - + diff --git a/front/src/views/login/index.vue b/front/src/views/login/index.vue index 4397dc2..d05a862 100644 --- a/front/src/views/login/index.vue +++ b/front/src/views/login/index.vue @@ -4,7 +4,7 @@ - + diff --git a/front/src/views/system-mgr/userList.vue b/front/src/views/system-mgr/userList.vue index 508bcf7..a79d3c4 100644 --- a/front/src/views/system-mgr/userList.vue +++ b/front/src/views/system-mgr/userList.vue @@ -49,8 +49,11 @@ - - + @@ -230,7 +233,7 @@ export default { }, //获取用户信息 getUserInfoList() { - user.getUserInfoList({ currPage: this.currPage, pageSize: this.pageSize, }).then(res => { + user.getUserInfoList({ currPage: this.currPage, pageSize: this.pageSize}).then(res => { this.userList = res.data.data.list; console.log('userList', this.userList); this.total = res.data.data.total;
暂无合同数据
该文件类型({{ fileExtension }})需要下载后查看
+npm
不支持的文件类型