From ac9a1dcf1347894ef96d2cf903859068383a5a1f Mon Sep 17 00:00:00 2001 From: xd <844539747@qq.com> Date: Thu, 11 Apr 2024 12:39:55 +0800 Subject: [PATCH] '123' --- .../web/controller/quot/QuotController.java | 11 ++- .../technicalConfirm/QuotJsqrController.java | 5 +- .../main/java/com/ruoyi/quot/domain/Quot.java | 10 ++- .../service/impl/QuotJsqrServiceImpl.java | 1 + .../main/resources/mapper/quot/QuotMapper.xml | 12 ++-- ruoyi-ui/src/views/quot/quot/index.vue | 69 ++++++++----------- 6 files changed, 54 insertions(+), 54 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/quot/QuotController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/quot/QuotController.java index bf91b58..a98b165 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/quot/QuotController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/quot/QuotController.java @@ -1,5 +1,6 @@ package com.ruoyi.web.controller.quot; +import java.util.Arrays; import java.util.List; import javax.servlet.http.HttpServletResponse; @@ -192,7 +193,7 @@ public class QuotController extends BaseController /** * 提交报价单至报价组 */ - @PreAuthorize("@ss.hasPermi('customer:customer:commit')") + @PreAuthorize("@ss.hasPermi('quot:quot:commit')") @Log(title = "报价单提交报价组", businessType = BusinessType.OTHER) @PostMapping("/commitQuot") public AjaxResult commitQuot(@RequestBody Quot quot) @@ -222,7 +223,13 @@ public class QuotController extends BaseController @PostMapping("/commitJsQuot") public AjaxResult commitJsQuot(@RequestBody Quot quot) { - String quotJsxzGroup = quot.getQuotJsxzGroup(); + String quotJsxzGroup = ""; + String quotJsxzGroupArr[] = quot.getQuotJsxzGroup(); + if(quotJsxzGroupArr.length>0){ + quotJsxzGroup = StringUtils.join(quotJsxzGroupArr, ","); + quot.setQuotJsxzGroupValues(quotJsxzGroup); + } + if(StringUtils.isEmpty(quotJsxzGroup)){ return error("请先选择分组"); }else{ diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/technicalConfirm/QuotJsqrController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/technicalConfirm/QuotJsqrController.java index 78b6caa..d292e6c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/technicalConfirm/QuotJsqrController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/technicalConfirm/QuotJsqrController.java @@ -267,9 +267,10 @@ public class QuotJsqrController extends BaseController } /** - * 获取报价单-技术确认单详细信息 + * 报价单-技术确认单 提交报价组 */ @PreAuthorize("@ss.hasPermi('jsqr:jsqr:commit')") + @Log(title = "报价单-技术确认单 提交报价组", businessType = BusinessType.UPDATE) @PostMapping("/commitQuot") public AjaxResult commitQuot(@RequestBody QuotJsqr quotJsqr) { @@ -277,7 +278,7 @@ public class QuotJsqrController extends BaseController QuotJsqr info = quotJsqrService.selectQuotJsqrByQuotJsqrId(quotJsqrId); Quot quot = quotService.selectQuotByQuotJsqrId(quotJsqrId); - String quot_jsxz_group = quot.getQuotJsxzGroup(); + String quot_jsxz_group = quot.getQuotJsxzGroup().toString(); String quotJsxzConfirmId = quot.getQuotJsxzConfirmId(); if(StringUtils.isNotEmpty(quotJsxzConfirmId)){ diff --git a/ruoyi-system/src/main/java/com/ruoyi/quot/domain/Quot.java b/ruoyi-system/src/main/java/com/ruoyi/quot/domain/Quot.java index 778e1f8..ebcabbe 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/quot/domain/Quot.java +++ b/ruoyi-system/src/main/java/com/ruoyi/quot/domain/Quot.java @@ -102,7 +102,8 @@ public class Quot extends BaseEntity private String quotJsxzApprovalStatus;//技术协助-协助状态 private String quotJsxzChapter;//技术协助-是否需要技术章 private String quotJsxzTechnicalRequirement;//技术协助-技术要求 - private String quotJsxzGroup;//技术协助-分组 + private String[] quotJsxzGroup;//技术协助-分组 + private String quotJsxzGroupValues;//技术协助-分组 private String quotJsxzConfirmId;//技术协助-技术确认单id private String quotJsxzConfirmCode;//技术协助-技术确认单号 @@ -314,8 +315,11 @@ public class Quot extends BaseEntity public String getQuotJsxzTechnicalRequirement() {return quotJsxzTechnicalRequirement; } public void setQuotJsxzTechnicalRequirement(String quotJsxzTechnicalRequirement) {this.quotJsxzTechnicalRequirement = quotJsxzTechnicalRequirement; } - public String getQuotJsxzGroup() {return quotJsxzGroup; } - public void setQuotJsxzGroup(String quotJsxzGroup) { this.quotJsxzGroup = quotJsxzGroup; } + public String[] getQuotJsxzGroup() {return quotJsxzGroup; } + public void setQuotJsxzGroup(String[] quotJsxzGroup) { this.quotJsxzGroup = quotJsxzGroup; } + + public String getQuotJsxzGroupValues() { return quotJsxzGroupValues; } + public void setQuotJsxzGroupValues(String quotJsxzGroupValues) { this.quotJsxzGroupValues = quotJsxzGroupValues; } public String getQuotJsxzConfirmId() { return quotJsxzConfirmId; } public void setQuotJsxzConfirmId(String quotJsxzConfirmId) { this.quotJsxzConfirmId = quotJsxzConfirmId; } diff --git a/ruoyi-system/src/main/java/com/ruoyi/technicalConfirm/service/impl/QuotJsqrServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/technicalConfirm/service/impl/QuotJsqrServiceImpl.java index c69d85d..42fec6e 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/technicalConfirm/service/impl/QuotJsqrServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/technicalConfirm/service/impl/QuotJsqrServiceImpl.java @@ -57,6 +57,7 @@ public class QuotJsqrServiceImpl implements IQuotJsqrService public int insertQuotJsqr(QuotJsqr quotJsqr) { quotJsqr.setCreateTime(DateUtils.getNowDate()); + quotJsqr.setUpdateTime(DateUtils.getNowDate()); return quotJsqrMapper.insertQuotJsqr(quotJsqr); } diff --git a/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml b/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml index 8826e5e..9813c0e 100644 --- a/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml @@ -36,7 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + @@ -71,7 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" a.create_by, a.create_time, a.update_by, a.update_time, u.nick_name create_name, a.quot_jsxz_standard,a.quot_jsxz_approval_status,a.quot_jsxz_chapter, - a.quot_jsxz_technical_requirement,a.quot_jsxz_group,a.quot_jsxz_confirm_id,q.quot_jsqr_code quot_jsxz_confirm_code + a.quot_jsxz_technical_requirement,a.quot_jsxz_group_values,a.quot_jsxz_confirm_id,q.quot_jsqr_code quot_jsxz_confirm_code from quot a @@ -96,7 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" a.quot_quantity, a.quot_total_price, a.quot_check_user_name, a.quot_check_user_nickname, a.quot_approval_status, a.create_by, a.create_time, a.update_by, a.update_time, a.quot_jsxz_standard,a.quot_jsxz_approval_status,a.quot_jsxz_chapter, - a.quot_jsxz_technical_requirement,a.quot_jsxz_group,a.quot_jsxz_confirm_id,q.quot_jsqr_code quot_jsxz_confirm_code, + a.quot_jsxz_technical_requirement,a.quot_jsxz_group_values,a.quot_jsxz_confirm_id,q.quot_jsqr_code quot_jsxz_confirm_code, b.mat_id as sub_mat_id, b.mat_xingh as sub_mat_xingh, b.mat_guig as sub_mat_guig, b.mat_diany as sub_mat_diany, b.mat_danw as sub_mat_danw, b.mat_sl as sub_mat_sl, @@ -140,7 +140,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" quot_jsxz_approval_status, quot_jsxz_chapter, quot_jsxz_technical_requirement, - quot_jsxz_group, + quot_jsxz_group_values, quot_jsxz_confirm_id, @@ -174,7 +174,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{quotJsxzApprovalStatus}, #{quotJsxzChapter}, #{quotJsxzTechnicalRequirement}, - #{quotJsxzGroup}, + #{quotJsxzGroupValues}, #{quotJsxzConfirmId}, @@ -211,7 +211,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" quot_jsxz_approval_status = #{quotJsxzApprovalStatus}, quot_jsxz_chapter = #{quotJsxzChapter}, quot_jsxz_technical_requirement = #{quotJsxzTechnicalRequirement}, - quot_jsxz_group = #{quotJsxzGroup}, + quot_jsxz_group_values = #{quotJsxzGroupValues}, quot_jsxz_confirm_id = #{quotJsxzConfirmId}, where quot_id = #{quotId} diff --git a/ruoyi-ui/src/views/quot/quot/index.vue b/ruoyi-ui/src/views/quot/quot/index.vue index 982a9e3..dd4d59f 100644 --- a/ruoyi-ui/src/views/quot/quot/index.vue +++ b/ruoyi-ui/src/views/quot/quot/index.vue @@ -669,7 +669,8 @@ export default { quotJsxzApprovalStatus: null, quotJsxzChapter: null, quotJsxzTechnicalRequirement: null, - quotJsxzGroup: null + quotJsxzGroup: [], + quotJsxzGroupValues: [] }; this.quotMaterialList = []; this.quotXjFileList = []; @@ -713,7 +714,7 @@ export default { const quotId = row.quotId || this.ids getQuot(quotId).then(response => { this.form = response.data; - this.$set(this.form, "quotJsxzGroup", (this.form.quotJsxzGroup==''||this.form.quotJsxzGroup==null)?[]:this.form.quotJsxzGroup.split(',')); + this.$set(this.form, "quotJsxzGroup", (this.form.quotJsxzGroupValues==''||this.form.quotJsxzGroupValues==null)?[]:this.form.quotJsxzGroupValues.split(',')); this.quotMaterialList = response.data.quotMaterialList; this.open = true; this.title = "修改报价"; @@ -727,17 +728,7 @@ export default { saveForm() { this.$refs["form"].validate(valid => { if (valid) { - //技术协助-分组传值 - let quotJsxzGroups = ''; - if(this.form.quotJsxzGroup){ - this.form.quotJsxzGroup.forEach(function (item,index) { - if(index !== 0){ - quotJsxzGroups+=','; - } - quotJsxzGroups+=item; - }) - } - this.form.quotJsxzGroup = quotJsxzGroups; + //this.form.quotJsxzGroup = this.convertString(); this.form.quotMaterialList = this.quotMaterialList; if (this.form.quotId != null) { updateQuot(this.form).then(response => { @@ -759,17 +750,7 @@ export default { commitForm() { this.$refs["form"].validate(valid => { if (valid) { - //技术协助-分组传值 - let quotJsxzGroups = ''; - if(this.form.quotJsxzGroup){ - this.form.quotJsxzGroup.forEach(function (item,index) { - if(index !== 0){ - quotJsxzGroups+=','; - } - quotJsxzGroups+=item; - }) - } - this.form.quotJsxzGroup = quotJsxzGroups; + //this.form.quotJsxzGroup = this.convertString(); this.form.quotMaterialList = this.quotMaterialList; commitQuot(this.form).then(response => { this.$modal.msgSuccess("提交成功"); @@ -780,27 +761,33 @@ export default { }); }, + /** 报价单-技术协助分组 格式转换 */ + convertString(){ + //技术协助-分组传值 + let quotJsxzGroups = ''; + if(this.form.quotJsxzGroup){ + this.form.quotJsxzGroup.forEach(function (item,index) { + if(index !== 0){ + quotJsxzGroups+=','; + } + quotJsxzGroups+=item; + }) + } + return quotJsxzGroups; + }, + /** 报价组权限控制 */ checkPermi, + /** 报价组提交技术协助按钮 */ commitJsForm() { - //技术协助-分组传值 - let quotJsxzGroups = ''; - if(this.form.quotJsxzGroup){ - this.form.quotJsxzGroup.forEach(function (item,index) { - if(index !== 0){ - quotJsxzGroups+=','; - } - quotJsxzGroups+=item; - }) - } - this.form.quotJsxzGroup = quotJsxzGroups; - this.form.quotMaterialList = this.quotMaterialList; - commitJsQuot(this.form).then(response => { - this.$modal.msgSuccess("提交技术协助成功"); - this.open = false; - this.getList(); - }); + //this.form.quotJsxzGroup = this.convertString(); + this.form.quotMaterialList = this.quotMaterialList; + commitJsQuot(this.form).then(response => { + this.$modal.msgSuccess("提交技术协助成功"); + this.open = false; + this.getList(); + }); }, /** 删除按钮操作 */ handleDelete(row) {