This commit is contained in:
xd 2024-06-14 11:59:47 +08:00
parent 46f9e13f80
commit e80137a0b5
6 changed files with 128 additions and 70 deletions

View File

@ -0,0 +1,11 @@
#for tests only !
#Fri Jun 14 11:47:35 CST 2024
jco.destination.pool_capacity=10
jco.client.lang=ZH
jco.client.ashost=172.19.0.120
jco.client.saprouter=
jco.client.user=RFC
jco.client.sysnr=00
jco.destination.peak_limit=10
jco.client.passwd=fIM!UgIY[[%*5IWWy6w`}PO$6)+{K)R`9,$_P^3ve}26(Qf|
jco.client.client=300

View File

@ -191,11 +191,28 @@ public class QuotController extends BaseController
@PostMapping @PostMapping
public AjaxResult add(@RequestBody Quot quot) public AjaxResult add(@RequestBody Quot quot)
{ {
// 获取用户角色 --判断是否是核价组角色
Boolean hjRoleFlag = false;
List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
for(SysRole sysRole:roles){
String roleKey = sysRole.getRoleKey();
if("PRICE_VERIFICATION".equals(roleKey) || "QUOT".equals(roleKey)){
hjRoleFlag = true;
break;
}
}
quot.setQuotId(UUID.fastUUID().toString()); quot.setQuotId(UUID.fastUUID().toString());
//quot.setQuotCode(IdUtils.createNo("BJD_",0)); //quot.setQuotCode(IdUtils.createNo("BJD_",0));
String quotCode = quotService.getCode("BJD"); String quotCode = quotService.getCode("BJD");
quot.setQuotCode(quotCode); quot.setQuotCode(quotCode);
if(hjRoleFlag){
quot.setCreateBy(quot.getQuotSalesmanCode());
}else{
quot.setCreateBy(getUsername()); quot.setCreateBy(getUsername());
}
//quot.setQuotSalesmanCode(getUsername()); //quot.setQuotSalesmanCode(getUsername());
quot.setUpdateBy(getUsername()); quot.setUpdateBy(getUsername());
quotService.insertQuot(quot); quotService.insertQuot(quot);
@ -210,7 +227,21 @@ public class QuotController extends BaseController
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody Quot quot) public AjaxResult edit(@RequestBody Quot quot)
{ {
// 获取用户角色 --判断是否是核价组角色
Boolean hjRoleFlag = false;
List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
for(SysRole sysRole:roles){
String roleKey = sysRole.getRoleKey();
if("PRICE_VERIFICATION".equals(roleKey) || "QUOT".equals(roleKey)){
hjRoleFlag = true;
break;
}
}
if(hjRoleFlag){
quot.setUpdateBy(quot.getQuotSalesmanCode());
}else{
quot.setUpdateBy(getUsername()); quot.setUpdateBy(getUsername());
}
return toAjax(quotService.updateQuot(quot)); return toAjax(quotService.updateQuot(quot));
} }
@ -318,7 +349,7 @@ public class QuotController extends BaseController
List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles(); List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
for(SysRole sysRole:roles){ for(SysRole sysRole:roles){
String roleKey = sysRole.getRoleKey(); String roleKey = sysRole.getRoleKey();
if("PRICE_VERIFICATION".equals(roleKey)){ if("PRICE_VERIFICATION".equals(roleKey) || "QUOT".equals(roleKey)){
hjRoleFlag = true; hjRoleFlag = true;
break; break;
} }
@ -354,12 +385,22 @@ public class QuotController extends BaseController
//quot.setQuotCode(IdUtils.createNo("BJD_",0)); //quot.setQuotCode(IdUtils.createNo("BJD_",0));
String quotCode = quotService.getCode("BJD"); String quotCode = quotService.getCode("BJD");
quot.setQuotCode(quotCode); quot.setQuotCode(quotCode);
if(hjRoleFlag){
quot.setCreateBy(quot.getQuotSalesmanCode());
}else{
quot.setCreateBy(getUsername()); quot.setCreateBy(getUsername());
}
//quot.setQuotSalesmanCode(getUsername()); //quot.setQuotSalesmanCode(getUsername());
quotService.insertQuot(quot); quotService.insertQuot(quot);
sendNoticeToBjz(quot); sendNoticeToBjz(quot);
return success(); return success();
}else{ }else{
if(hjRoleFlag){
quot.setUpdateBy(quot.getQuotSalesmanCode());
}else{
quot.setUpdateBy(getUsername());
}
quotService.updateQuot(quot); quotService.updateQuot(quot);
sendNoticeToBjz(quot); sendNoticeToBjz(quot);
return success(); return success();

View File

@ -323,7 +323,11 @@ public class RedBookController extends BaseController
} }
String voltage = temp.getVoltage(); String voltage = temp.getVoltage();
temp.setVoltage(StringUtils.isBlank(voltage)?"0.6/1kV":voltage.replace(" ","")); if(StringUtils.isNotBlank(voltage)){
voltage = voltage.replace(" ","");
voltage = voltage.toUpperCase();
}
temp.setVoltage(StringUtils.isBlank(voltage)?"0.6/1KV":voltage);
index++; index++;
} }

View File

@ -178,7 +178,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
convert(decimal,convert(float,A.红本价格)) price,convert(varchar(10),B.date_0,23) pricedate convert(decimal,convert(float,A.红本价格)) price,convert(varchar(10),B.date_0,23) pricedate
from [rb_product_price] A from [rb_product_price] A
left join rb_productVersion B on A.version_uid_0=B.uid_0 left join rb_productVersion B on A.version_uid_0=B.uid_0
where A.型号 = #{name_1} and A.规格 = #{spec} and A.电压等级 = #{voltage} where A.型号 = #{name_1} and A.规格 = #{spec} and UPPER(A.电压等级) = #{voltage}
and B.uid_0 = #{uid_0} and B.uid_0 = #{uid_0}
and (B.sta_0=1 or sta_0=0) and (B.sta_0=1 or sta_0=0)
</select> </select>

View File

@ -381,24 +381,25 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-divider content-position="left" class="customer_divider_text">反馈附件</el-divider>
<div v-hasPermi="['quot:quot:quotFkFile']" > <el-divider content-position="left" class="customer_divider_text">清单附件(先保存再上传且必须是EXCEL文件)</el-divider>
<div v-hasPermi="['quot:quot:quotXjFile']">
<el-upload class="upload-demo" <el-upload class="upload-demo"
ref="quotFkFileUpload" ref="quotXjFileUpload"
name="quotFile" name="quotFile"
:action="uploadUrl" :action="uploadUrl"
:headers="headers" :headers="headers"
:data="{ relation_id: this.form.quotId,file_type: 'quotFkFile' }" :data="{ relation_id: this.form.quotId,file_type: 'quotXjFile' }"
:before-upload="beforeAvatarUploadQuotFkFile" :before-upload="beforeAvatarUploadQuotXjFile"
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
:show-file-list="false" :show-file-list="false"
:limit="1" :limit="1"
v-if="this.form.quotApprovalStatus == '1'"> v-if="this.form.quotApprovalStatus == '0'">
<el-button size="small" type="primary" @click="uploadFile('quotFkFile')">上传文件</el-button> <el-button size="small" type="primary" @click="uploadFile('quotXjFile')">上传文件</el-button>
</el-upload> </el-upload>
</div> </div>
<el-table class="down" v-loading="quotFkFileLoading" :data="quotFkFileList" border stripe style="width: 100%;margin-top: 10px;" height="200px"> <el-table class="down" v-loading="quotXjFileLoading" :data="quotXjFileList" border stripe style="width: 100%;margin-top: 10px;" height="200px">
<el-table-column prop="fileName" label="文件名称"></el-table-column> <el-table-column prop="fileName" label="文件名称" ></el-table-column>
<el-table-column prop="fileSize" label="文件大小" width="150px"> <el-table-column prop="fileSize" label="文件大小" width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.fileSize / 1024 / 1024 < 1">{{(scope.row.fileSize / 1024).toFixed(2) + 'KB'}}</span> <span v-if="scope.row.fileSize / 1024 / 1024 < 1">{{(scope.row.fileSize / 1024).toFixed(2) + 'KB'}}</span>
@ -408,10 +409,49 @@
<el-table-column prop="fileTime" label="上传时间" width="200px"></el-table-column> <el-table-column prop="fileTime" label="上传时间" width="200px"></el-table-column>
<el-table-column width="150px" label="操作"> <el-table-column width="150px" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="small" type="text"> <el-button :key="Math.random()" size="small" type="text">
<a @click="downloadFile(scope.row.fileUrl)">下载</a> <a @click="downloadFile(scope.row.fileUrl)">下载</a>
</el-button> </el-button>
<el-button size="small" type="text" @click="deleteFile(scope.row.fileId,'quotFkFile')" v-if="form.quotApprovalStatus == '1'">删除</el-button> <el-button :key="Math.random()" size="small" type="text" v-if="form.quotApprovalStatus == '0'">
<a @click="deleteFile(scope.row.fileId,'quotXjFile')">删除</a>
</el-button>
</template>
</el-table-column>
</el-table>
<el-divider content-position="left" class="customer_divider_text">技术附件(先保存再上传,如包含清单附件则不受理)</el-divider>
<div v-hasPermi="['quot:quot:quotJsgfFile']">
<el-upload class="upload-demo"
ref="quotJsgfFileUpload"
name="quotFile"
:action="uploadUrl"
:headers="headers"
:data="{ relation_id: this.form.quotId,file_type: 'quotJsgfFile' }"
:before-upload="beforeAvatarUploadQuotJsgfFile"
:on-success="handleAvatarSuccess"
:show-file-list="false"
:limit="1"
v-if="this.form.quotApprovalStatus == '0'">
<el-button size="small" type="primary" @click="uploadFile('quotJsgfFile')">上传文件</el-button>
</el-upload>
</div>
<el-table class="down" v-loading="quotJsgfFileLoading" :data="quotJsgfFileList" border stripe style="width: 100%;margin-top: 10px;" height="200px">
<el-table-column prop="fileName" label="文件名称" ></el-table-column>
<el-table-column prop="fileSize" label="文件大小" width="150px">
<template slot-scope="scope">
<span v-if="scope.row.fileSize / 1024 / 1024 < 1">{{(scope.row.fileSize / 1024).toFixed(2) + 'KB'}}</span>
<span v-else>{{(scope.row.fileSize / 1024 / 1024).toFixed(2) + 'MB'}}</span>
</template>
</el-table-column>
<el-table-column prop="fileTime" label="上传时间" width="200px"></el-table-column>
<el-table-column width="150px" label="操作">
<template slot-scope="scope">
<el-button :key="Math.random()" size="small" type="text">
<a @click="downloadFile(scope.row.fileUrl)">下载</a>
</el-button>
<el-button :key="Math.random()" size="small" type="text" v-if="form.quotApprovalStatus == '0'">
<a @click="deleteFile(scope.row.fileId,'quotJsgfFile')">删除</a>
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -496,24 +536,24 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-divider content-position="left" class="customer_divider_text">清单附件(先保存再上传且必须是EXCEL文件)</el-divider> <el-divider content-position="left" class="customer_divider_text">反馈附件</el-divider>
<div v-hasPermi="['quot:quot:quotXjFile']"> <div v-hasPermi="['quot:quot:quotFkFile']" >
<el-upload class="upload-demo" <el-upload class="upload-demo"
ref="quotXjFileUpload" ref="quotFkFileUpload"
name="quotFile" name="quotFile"
:action="uploadUrl" :action="uploadUrl"
:headers="headers" :headers="headers"
:data="{ relation_id: this.form.quotId,file_type: 'quotXjFile' }" :data="{ relation_id: this.form.quotId,file_type: 'quotFkFile' }"
:before-upload="beforeAvatarUploadQuotXjFile" :before-upload="beforeAvatarUploadQuotFkFile"
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
:show-file-list="false" :show-file-list="false"
:limit="1" :limit="1"
v-if="this.form.quotApprovalStatus == '0'"> v-if="this.form.quotApprovalStatus == '1'">
<el-button size="small" type="primary" @click="uploadFile('quotXjFile')">上传文件</el-button> <el-button size="small" type="primary" @click="uploadFile('quotFkFile')">上传文件</el-button>
</el-upload> </el-upload>
</div> </div>
<el-table class="down" v-loading="quotXjFileLoading" :data="quotXjFileList" border stripe style="width: 100%;margin-top: 10px;" height="200px"> <el-table class="down" v-loading="quotFkFileLoading" :data="quotFkFileList" border stripe style="width: 100%;margin-top: 10px;" height="200px">
<el-table-column prop="fileName" label="文件名称" ></el-table-column> <el-table-column prop="fileName" label="文件名称"></el-table-column>
<el-table-column prop="fileSize" label="文件大小" width="150px"> <el-table-column prop="fileSize" label="文件大小" width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.fileSize / 1024 / 1024 < 1">{{(scope.row.fileSize / 1024).toFixed(2) + 'KB'}}</span> <span v-if="scope.row.fileSize / 1024 / 1024 < 1">{{(scope.row.fileSize / 1024).toFixed(2) + 'KB'}}</span>
@ -523,52 +563,14 @@
<el-table-column prop="fileTime" label="上传时间" width="200px"></el-table-column> <el-table-column prop="fileTime" label="上传时间" width="200px"></el-table-column>
<el-table-column width="150px" label="操作"> <el-table-column width="150px" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button :key="Math.random()" size="small" type="text"> <el-button size="small" type="text">
<a @click="downloadFile(scope.row.fileUrl)">下载</a> <a @click="downloadFile(scope.row.fileUrl)">下载</a>
</el-button> </el-button>
<el-button :key="Math.random()" size="small" type="text" v-if="form.quotApprovalStatus == '0'"> <el-button size="small" type="text" @click="deleteFile(scope.row.fileId,'quotFkFile')" v-if="form.quotApprovalStatus == '1'">删除</el-button>
<a @click="deleteFile(scope.row.fileId,'quotXjFile')">删除</a>
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-divider content-position="left" class="customer_divider_text">技术附件(先保存再上传,如包含清单附件则不受理)</el-divider>
<div v-hasPermi="['quot:quot:quotJsgfFile']">
<el-upload class="upload-demo"
ref="quotJsgfFileUpload"
name="quotFile"
:action="uploadUrl"
:headers="headers"
:data="{ relation_id: this.form.quotId,file_type: 'quotJsgfFile' }"
:before-upload="beforeAvatarUploadQuotJsgfFile"
:on-success="handleAvatarSuccess"
:show-file-list="false"
:limit="1"
v-if="this.form.quotApprovalStatus == '0'">
<el-button size="small" type="primary" @click="uploadFile('quotJsgfFile')">上传文件</el-button>
</el-upload>
</div>
<el-table class="down" v-loading="quotJsgfFileLoading" :data="quotJsgfFileList" border stripe style="width: 100%;margin-top: 10px;" height="200px">
<el-table-column prop="fileName" label="文件名称" ></el-table-column>
<el-table-column prop="fileSize" label="文件大小" width="150px">
<template slot-scope="scope">
<span v-if="scope.row.fileSize / 1024 / 1024 < 1">{{(scope.row.fileSize / 1024).toFixed(2) + 'KB'}}</span>
<span v-else>{{(scope.row.fileSize / 1024 / 1024).toFixed(2) + 'MB'}}</span>
</template>
</el-table-column>
<el-table-column prop="fileTime" label="上传时间" width="200px"></el-table-column>
<el-table-column width="150px" label="操作">
<template slot-scope="scope">
<el-button :key="Math.random()" size="small" type="text">
<a @click="downloadFile(scope.row.fileUrl)">下载</a>
</el-button>
<el-button :key="Math.random()" size="small" type="text" v-if="form.quotApprovalStatus == '0'">
<a @click="deleteFile(scope.row.fileId,'quotJsgfFile')">删除</a>
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 技术协助块--> <!-- 技术协助块-->
<div v-if="checkPermi(['quot:quot:jsxzInfo'])"> <div v-if="checkPermi(['quot:quot:jsxzInfo'])">

View File

@ -8,11 +8,10 @@
<el-button style="float: right;" size="mini" type="primary" icon="el-icon-search" @click="handleSearchClick">搜索</el-button> <el-button style="float: right;" size="mini" type="primary" icon="el-icon-search" @click="handleSearchClick">搜索</el-button>
</el-col> </el-col>
<el-col :span="14"> <el-col :span="14">
<el-button size="mini" icon="el-icon-refresh" @click="handleRefreshClick">刷新</el-button>
<el-button style="float: right;margin-left: 5px;" size="mini" type="success" icon="el-icon-document" @click="handleMadeQuotClick" :disabled="selectedResultData.length==0 || madeQuotDis">生成报价单</el-button> <el-button style="float: right;margin-left: 5px;" size="mini" type="success" icon="el-icon-document" @click="handleMadeQuotClick" :disabled="selectedResultData.length==0 || madeQuotDis">生成报价单</el-button>
<el-button style="float: right;margin-left: 5px;" size="mini" type="warning" icon="el-icon-folder" @click="handleSaveClick" :disabled="selectedResultData.length==0">保存</el-button> <el-button style="float: right;margin-left: 5px;" size="mini" type="warning" icon="el-icon-folder" @click="handleSaveClick" :disabled="selectedResultData.length==0">保存</el-button>
<el-button style="float: right;margin-left: 5px;" size="mini" icon="el-icon-refresh" @click="handleRefreshClick">清空信息</el-button>
<el-button style="float: right;" size="mini" type="info" plain icon="el-icon-upload2" @click="handleImport">导入</el-button> <el-button style="float: right;" size="mini" type="info" plain icon="el-icon-upload2" @click="handleImport">导入</el-button>
</el-col> </el-col>
</el-row> </el-row>
@ -153,7 +152,7 @@
<el-button type="text" @click="handleDeleteClick(scope.$index)">删除</el-button> <el-button type="text" @click="handleDeleteClick(scope.$index)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="版本uid" align="center" prop="uid_0" v-if="false"/> <el-table-column label="版本uid" align="center" prop="uid_0"/>
<el-table-column label="产品型号" align="center" prop="name_0" width="200" /> <el-table-column label="产品型号" align="center" prop="name_0" width="200" />
<el-table-column label="型号" align="center" prop="name_1" v-if="false"/> <el-table-column label="型号" align="center" prop="name_1" v-if="false"/>
<el-table-column label="规格" align="center" prop="spec" v-if="false"/> <el-table-column label="规格" align="center" prop="spec" v-if="false"/>
@ -594,7 +593,7 @@
const allPrice = toDecimal(count * price * (per?per:1) * (per2?per2:1)); const allPrice = toDecimal(count * price * (per?per:1) * (per2?per2:1));
const rowDate = { const rowDate = {
uid_0: uid_0, uid_0: uid_0.toString(),
name_0: name_0, name_0: name_0,
name_1: model, name_1: model,
spec: spec, spec: spec,
@ -908,6 +907,7 @@
isColumn1ValuesEqual() { isColumn1ValuesEqual() {
if(this.selectedResultData.length > 0){ if(this.selectedResultData.length > 0){
const uid_0 = this.selectedResultData[0].uid_0;//uid const uid_0 = this.selectedResultData[0].uid_0;//uid
console.log(this.selectedResultData)
return this.selectedResultData.every(row => row.uid_0 === uid_0); return this.selectedResultData.every(row => row.uid_0 === uid_0);
}else{ }else{
return false; return false;