This commit is contained in:
xd 2024-07-23 08:22:26 +08:00
parent bbcace7422
commit 6476055501
4 changed files with 128 additions and 14 deletions

View File

@ -20,6 +20,7 @@ import com.ruoyi.quot.domain.Quot;
import com.ruoyi.redBook.domain.OAQuot; import com.ruoyi.redBook.domain.OAQuot;
import com.ruoyi.redBook.domain.RbVersionDateResult; import com.ruoyi.redBook.domain.RbVersionDateResult;
import com.ruoyi.system.service.ISysDeptService; import com.ruoyi.system.service.ISysDeptService;
import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.technicalConfirm.domain.BidJsqr; import com.ruoyi.technicalConfirm.domain.BidJsqr;
import com.ruoyi.technicalConfirm.service.IBidJsqrService; import com.ruoyi.technicalConfirm.service.IBidJsqrService;
import com.ruoyi.technicalConfirm.service.IQuotJsqrService; import com.ruoyi.technicalConfirm.service.IQuotJsqrService;
@ -56,6 +57,9 @@ public class BidController extends BaseController
@Autowired @Autowired
private IBidJsqrService bidJsqrService; private IBidJsqrService bidJsqrService;
@Autowired
private ISysUserService userService;
@Autowired @Autowired
private ISysDeptService deptService; private ISysDeptService deptService;
@ -244,13 +248,19 @@ public class BidController extends BaseController
@ChangeRecordLog(serviceImplclass = "com.ruoyi.bid.service.impl.BidServiceImpl", @ChangeRecordLog(serviceImplclass = "com.ruoyi.bid.service.impl.BidServiceImpl",
serviceImplMethod="selectBidByBidId", serviceImplMethod="selectBidByBidId",
tableId = "bidId",codeName = "bidCode") tableId = "bidId",codeName = "bidCode")
@Log(title = "提交投标办", businessType = BusinessType.OTHER) @Log(title = "投标信息提交投标办", businessType = BusinessType.OTHER)
@PostMapping("/commitTbxx") @PostMapping("/commitTbxx")
public AjaxResult commitTbxx(@RequestBody Bid bid) public AjaxResult commitTbxx(@RequestBody Bid bid)
{ {
try{ try{
// TODO 如果是事业部直营店 则提交OA审核 如果是业务员则提交投标办审批(1-直营店2-事业部) // TODO 如果是事业部直营店 则提交OA审核 如果是业务员则提交投标办审批(1-直营店2-事业部)
Long deptId = getLoginUser().getUser().getDeptId(); Long deptId = getLoginUser().getUser().getDeptId();
// 获取用户角色 --判断是否是投标小组经理角色
Boolean bidJlRoleFlag = SecurityUtils.hasRole("BID");
if(bidJlRoleFlag){
deptId = userService.selectUserByUserName(bid.getBidSalesmanCode()).getDeptId();
}
SysDept sysDept = deptService.selectDeptById(deptId); SysDept sysDept = deptService.selectDeptById(deptId);
String zydSyb = sysDept.getZydSyb(); String zydSyb = sysDept.getZydSyb();
if("1".equals(zydSyb)||"2".equals(zydSyb)){ if("1".equals(zydSyb)||"2".equals(zydSyb)){
@ -310,9 +320,6 @@ public class BidController extends BaseController
bid.setBidApprovalStatus("1"); bid.setBidApprovalStatus("1");
} }
// 获取用户角色 --判断是否是投标小组经理角色
Boolean bidJlRoleFlag = SecurityUtils.hasRole("BID");
String bid_id = bid.getBidId(); String bid_id = bid.getBidId();
if(StringUtils.isEmpty(bid_id)){ if(StringUtils.isEmpty(bid_id)){
bid.setBidId(UUID.fastUUID().toString()); bid.setBidId(UUID.fastUUID().toString());

View File

@ -2,9 +2,8 @@ package com.ruoyi.web.controller.zgys;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.bid.domain.Bid;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.file.FileUploadUtils; import com.ruoyi.common.utils.file.FileUploadUtils;
import com.ruoyi.common.utils.file.MinioUtil; import com.ruoyi.common.utils.file.MinioUtil;
@ -107,6 +106,49 @@ public class ZgysController extends BaseController
return toAjax(zgysService.updateZgys(zgys)); return toAjax(zgysService.updateZgys(zgys));
} }
/**
* 提交投标办按钮
*/
@PreAuthorize("@ss.hasPermi('zgys:zgys:commit')")
@ChangeRecordLog(serviceImplclass = "com.ruoyi.zgys.service.impl.ZgysServiceImpl",
serviceImplMethod="selectZgysByPqId",
tableId = "pqId",codeName = "pqCode")
@Log(title = "资格预审提交投标办", businessType = BusinessType.OTHER)
@PostMapping("/commitZgys")
public AjaxResult commitZgys(@RequestBody Zgys zgys)
{
try{
zgys.setPqApprovalStatus("1");
// 获取用户角色 --判断是否是投标小组经理角色
Boolean bidJlRoleFlag = SecurityUtils.hasRole("BID");
String pq_id = zgys.getPqId();
if(StringUtils.isEmpty(pq_id)){
zgys.setPqId(UUID.fastUUID().toString());
String pqCode = zgysService.getCode("ZGYS");
zgys.setPqCode(pqCode);
if(bidJlRoleFlag){
zgys.setCreateBy(zgys.getPqSalesmanCode());
}else{
zgys.setCreateBy(getUsername());
}
zgysService.insertZgys(zgys);
return success();
}else{
if(bidJlRoleFlag){
zgys.setUpdateBy(zgys.getPqSalesmanCode());
}else{
zgys.setUpdateBy(getUsername());
}
zgysService.updateZgys(zgys);
return success();
}
}catch (Exception e){
return error("系统异常");
}
}
/** /**
* 删除资格预审 * 删除资格预审
*/ */

View File

@ -60,3 +60,12 @@ export function zgysFileDelete(fileId) {
params: {fileId:fileId} params: {fileId:fileId}
}) })
} }
//提交投标办按钮
export function commitZgys(data) {
return request({
url: '/zgys/zgys/commitZgys',
method: 'post',
data: data
})
}

View File

@ -163,7 +163,7 @@
/> />
<!-- 添加或修改资格预审对话框 --> <!-- 添加或修改资格预审对话框 -->
<el-dialog :title="title" :visible.sync="open" width="1150px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="1150px" v-el-drag-dialog append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="150px"> <el-form ref="form" :model="form" :rules="rules" label-width="150px">
<el-divider content-position="left" class="customer_divider_text">当前协助情况</el-divider> <el-divider content-position="left" class="customer_divider_text">当前协助情况</el-divider>
<el-row> <el-row>
@ -195,7 +195,8 @@
<el-form-item label="业务员" prop="pqSalesmanName"> <el-form-item label="业务员" prop="pqSalesmanName">
<el-input v-model="form.pqSalesmanCode" v-if="false"/> <el-input v-model="form.pqSalesmanCode" v-if="false"/>
<el-input v-model="form.pqSalesmanBm" v-if="false"/> <el-input v-model="form.pqSalesmanBm" v-if="false"/>
<el-input v-model="form.pqSalesmanName" :disabled="true"/> <el-input v-model="form.pqSalesmanName" :disabled="true" style="width: 60%"/>
<el-button v-hasPermi="['system:user:list']" type="primary" icon="el-icon-search" style="margin-left: 10px" @click="openPeopleSelectYwy" size="mini"></el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -346,9 +347,11 @@
</el-table> </el-table>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <!-- 业务员提交保存-->
<el-button @click="cancel"> </el-button> <span v-hasPermi="['zgys:zgys:save']"><el-button @click="saveForm" v-if="this.form.pqApprovalStatus == '0' || this.form.pqApprovalStatus == null"> </el-button></span>
<span style="margin-left: 10px" v-hasPermi="['zgys:zgys:commit']"><el-button type="primary" plain @click="commitForm" v-if="this.form.pqApprovalStatus == '0' || this.form.pqApprovalStatus == null"> </el-button></span>
</div> </div>
<PeopleSelect v-if="checkRole(['BID'])" ref="peopleSelect" :type="'single'" :isCheck="true" :open="peopleOpenSelectYwy" @cancel="peopleOpenSelectYwy=false" @submit="submitPeopleSelectYwy"></PeopleSelect>
<!-- 客户选择对话框--> <!-- 客户选择对话框-->
<CustomerSelect ref="customerSelect" :open="customerOpen" @submit="submitCustomer" @cancel="customerOpen=false"></CustomerSelect> <CustomerSelect ref="customerSelect" :open="customerOpen" @submit="submitCustomer" @cancel="customerOpen=false"></CustomerSelect>
</el-dialog> </el-dialog>
@ -372,17 +375,27 @@
} }
</style> </style>
<script> <script>
import { checkPermi,checkRole } from '@/utils/permission';//
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import { listZgys, getZgys, delZgys, addZgys, updateZgys, zgysFileList, zgysFileDelete } from "@/api/zgys/zgys"; import { listZgys, getZgys, delZgys, addZgys, updateZgys, zgysFileList, zgysFileDelete, commitZgys } from "@/api/zgys/zgys";
/** 弹窗放大、拖拽 */
import elDragDialog from "@/directive/dialog/dragDialog";
/** 导入客户选择组件 */ /** 导入客户选择组件 */
import CustomerSelect from "@/views/components/Tools/CustomerSelect/index.vue"; import CustomerSelect from "@/views/components/Tools/CustomerSelect/index.vue";
/** 导入选人组件 */
import PeopleSelect from "@/views/components/Tools/PeopleSelect/index.vue";
export default { export default {
name: "Zgys", name: "Zgys",
dicts: ['pq_approval_status','pq_archiving', 'pq_bid_winning_status', 'pq_empower', 'pq_illustrate'], directives: {
elDragDialog,
},
components: { components: {
// //
'CustomerSelect': CustomerSelect, 'CustomerSelect': CustomerSelect,
'PeopleSelect': PeopleSelect,
}, },
dicts: ['pq_approval_status','pq_archiving', 'pq_bid_winning_status', 'pq_empower', 'pq_illustrate'],
data() { data() {
return { return {
// //
@ -455,12 +468,20 @@ export default {
activeName: '', activeName: '',
zgysYwyFileLoading: false, zgysYwyFileLoading: false,
zgysYwyFileList: [], zgysYwyFileList: [],
//
peopleOpenFp:false, //
peopleOpenSelectYwy:false, //
selectedPeoples:[],
}; };
}, },
created() { created() {
this.getList(); this.getList();
}, },
methods: { methods: {
/** 权限控制 */
checkPermi,
checkRole,
/** 查询资格预审列表 */ /** 查询资格预审列表 */
getList() { getList() {
this.loading = true; this.loading = true;
@ -551,7 +572,7 @@ export default {
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { saveForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if (this.form.pqId != null) { if (this.form.pqId != null) {
@ -570,6 +591,18 @@ export default {
} }
}); });
}, },
/** 提交投标办按钮 */
commitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
commitZgys(this.form).then(response => {
this.$modal.msgSuccess("提交成功");
this.open = false;
this.getList();
});
}
});
},
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const pqIds = row.pqId || this.ids; const pqIds = row.pqId || this.ids;
@ -586,7 +619,28 @@ export default {
...this.queryParams ...this.queryParams
}, `zgys_${new Date().getTime()}.xlsx`) }, `zgys_${new Date().getTime()}.xlsx`)
}, },
/*********************************打开选人弹窗*****************************************/
//-
openPeopleSelectYwy(){
this.peopleOpenSelectYwy=true;
},
//-
submitPeopleSelectYwy(peopleList,nickNameList){
this.selectedPeoples = this.selectedPeoples.concat(nickNameList)
this.selectedPeoples = this.unique(this.selectedPeoples)
this.form.pqSalesmanName = this.selectedPeoples[0].nickName;
this.form.pqSalesmanBm = this.selectedPeoples[0].sapUserBm;
this.form.pqSalesmanCode = this.selectedPeoples[0].userName;
this.peopleOpenSelectYwy=false;
},
//
unique(arr) {
const res = new Map();
return arr.filter((arr) => !res.has(arr.userName) && res.set(arr.userName, 1));
},
/*********************************打开选人弹窗*****************************************/
/*********************************打开选客户弹窗*****************************************/
/** 打开客户选择弹窗 */ /** 打开客户选择弹窗 */
openCustomer(){ openCustomer(){
this.customerOpen=true; this.customerOpen=true;
@ -597,8 +651,9 @@ export default {
this.form.pqCustomerName = customer.label; this.form.pqCustomerName = customer.label;
this.customerOpen=false; this.customerOpen=false;
}, },
/*********************************打开选客户弹窗*****************************************/
/*********************************附件上传操作*****************************************/
// //
uploadFile(activeName){ uploadFile(activeName){
this.activeName = activeName this.activeName = activeName
@ -653,6 +708,7 @@ export default {
}) })
} }
}, },
/*********************************附件上传操作*****************************************/
} }
}; };
</script> </script>