fix(inventory): 修正采购订单导入逻辑及产品类型查询条件
- 修改了采购订单导入前的判断逻辑,确保新华三产品类型正确处理 - 在内部库存查询中增加了产品类型'70'的支持 - 更新了用户个人资料页面的部门显示逻辑 - 移除了控制台调试日志输出 - 新增批量审批订单功能接口与实现 - 优化项目选择回调函数并同步 shipmentAmount 字段 - 修正采购订单详情中的制造商名称显示问题 - 在采购订单明细中增加税率展示列 - 更新用户密码重置接口调用方式和参数结构 - 调整后端获取用户信息接口路径以支持 Vue 页面需求master
parent
25cc3d18fa
commit
0b1d0f45cc
|
|
@ -79,7 +79,7 @@ export function changeUserStatus(userId, status) {
|
||||||
// 查询用户个人信息
|
// 查询用户个人信息
|
||||||
export function getUserProfile() {
|
export function getUserProfile() {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/user/profile',
|
url: '/system/user/profile/vue',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -94,14 +94,11 @@ export function updateUserProfile(data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 用户密码重置
|
// 用户密码重置
|
||||||
export function updateUserPwd(oldPassword, newPassword) {
|
export function updateUserPwd(data) {
|
||||||
const data = {
|
|
||||||
oldPassword,
|
|
||||||
newPassword
|
|
||||||
}
|
|
||||||
return request({
|
return request({
|
||||||
url: '/system/user/profile/updatePwd',
|
url: '/system/user/profile/resetPwd',
|
||||||
method: 'put',
|
method: 'post',
|
||||||
|
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -421,7 +421,7 @@ export default {
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
if (this.activeTab==='service'){
|
if (this.activeTab==='service'){
|
||||||
this.queryParams.productTypeList = ['11','22'];
|
this.queryParams.productTypeList = ['11','22','70'];
|
||||||
}else{
|
}else{
|
||||||
this.queryParams.productTypeList = ['1','2','99'];
|
this.queryParams.productTypeList = ['1','2','99'];
|
||||||
}
|
}
|
||||||
|
|
@ -452,7 +452,7 @@ export default {
|
||||||
this.reset();
|
this.reset();
|
||||||
if (type==='maintenance'){
|
if (type==='maintenance'){
|
||||||
this.isServiceIn = true;
|
this.isServiceIn = true;
|
||||||
this.queryProductType=['11','22']
|
this.queryProductType=['11','22','70']
|
||||||
}else{
|
}else{
|
||||||
this.isServiceIn = false;
|
this.isServiceIn = false;
|
||||||
this.queryProductType=['1','2','99']
|
this.queryProductType=['1','2','99']
|
||||||
|
|
|
||||||
|
|
@ -177,7 +177,7 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleSelectPurchaseBeforeImport() {
|
handleSelectPurchaseBeforeImport() {
|
||||||
if (((this.productData.orderType || '1') === '1' ) || !(this.outerData.vendorName.startsWith('新华三') && this.productData.productType==='2')) {
|
if (((this.productData.orderType || '1') === '1' ) && !(this.outerData.vendorName.startsWith('新华三') && this.productData.productType==='2')) {
|
||||||
this.purchaseOrderSelectVisible = true;
|
this.purchaseOrderSelectVisible = true;
|
||||||
}else{
|
}else{
|
||||||
this.handleImport()
|
this.handleImport()
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,7 @@
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<select-project :visible.sync="selectProjectVisible" @project-selected="handleProjectSelected"/>
|
<select-project :visible.sync="selectProjectVisible" @project-selected="selectProject"/>
|
||||||
<select-user :visible.sync="selectUserVisible" @user-selected="handleUserSelected"/>
|
<select-user :visible.sync="selectUserVisible" @user-selected="handleUserSelected"/>
|
||||||
<select-partner :visible.sync="selectPartnerVisible" @partner-selected="handlePartnerSelected"/>
|
<select-partner :visible.sync="selectPartnerVisible" @partner-selected="handlePartnerSelected"/>
|
||||||
<select-commit-type :visible.sync="selectCommitTypeVisible" :order-channel="form.orderChannel" @commit-type-selected="handleCommitTypeSelected"/>
|
<select-commit-type :visible.sync="selectCommitTypeVisible" :order-channel="form.orderChannel" @commit-type-selected="handleCommitTypeSelected"/>
|
||||||
|
|
@ -400,8 +400,6 @@ export default {
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
this.activeContractVersionTab = currentVersion;
|
this.activeContractVersionTab = currentVersion;
|
||||||
console.log('11111')
|
|
||||||
console.log(this.projectId)
|
|
||||||
if (this.projectId) {
|
if (this.projectId) {
|
||||||
getProject(this.projectId).then(response => {
|
getProject(this.projectId).then(response => {
|
||||||
this.handleProjectSelected(response.data.project);
|
this.handleProjectSelected(response.data.project);
|
||||||
|
|
@ -409,6 +407,11 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
selectProject(projectData){
|
||||||
|
getProject(projectData.id).then(response => {
|
||||||
|
this.handleProjectSelected(response.data.project);
|
||||||
|
});
|
||||||
|
},
|
||||||
handleClose() {
|
handleClose() {
|
||||||
this.$emit('update:visible', false);
|
this.$emit('update:visible', false);
|
||||||
},
|
},
|
||||||
|
|
@ -505,6 +508,7 @@ export default {
|
||||||
this.form.industryType = projectData.industryType;
|
this.form.industryType = projectData.industryType;
|
||||||
this.isProjectSelected = true;
|
this.isProjectSelected = true;
|
||||||
this.selectProjectVisible = false;
|
this.selectProjectVisible = false;
|
||||||
|
this.form.shipmentAmount = this.totalConfigAmount;
|
||||||
},
|
},
|
||||||
openSelectPeople() {
|
openSelectPeople() {
|
||||||
this.selectUserVisible = true;
|
this.selectUserVisible = true;
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="制造商" prop="vendorId">
|
<el-form-item label="制造商" prop="vendorId">
|
||||||
<el-select v-model="form.vendorId" placeholder="请选择制造商" style="width:100%" @change="handleVendorChange">
|
<el-select v-model="form.vendorId" placeholder="请选择制造商" style="width:100%" @change="handleVendorChange">
|
||||||
<el-option v-for="item in vendorOptions" :key="item.vendorId" :label="item.vendorName" :value="item.vendorId"></el-option>
|
<el-option v-for="item in vendorOptions" :key="item.vendorId" :label="item.vendorAddress" :value="item.vendorId"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
<el-row v-if="selectedVendor.vendorId">
|
<el-row v-if="selectedVendor.vendorId">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="制造商名称">
|
<el-form-item label="制造商名称">
|
||||||
<span>{{ selectedVendor.vendorAddress }}</span>
|
<span>{{ selectedVendor.vendorName }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
|
|
||||||
|
|
@ -142,6 +142,11 @@
|
||||||
<span>{{ scope.row.price }}</span>
|
<span>{{ scope.row.price }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="税率(%)" prop="taxRate">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.taxRate *100}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="含税小计" prop="amountTotal"></el-table-column>
|
<el-table-column label="含税小计" prop="amountTotal"></el-table-column>
|
||||||
<el-table-column label="交货日期">
|
<el-table-column label="交货日期">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<svg-icon icon-class="tree" />所属部门
|
<svg-icon icon-class="tree" />所属部门
|
||||||
<div class="pull-right" v-if="user.dept">{{ user.dept.deptName }} / {{ postGroup }}</div>
|
<div class="pull-right" v-if="user.dept">{{ user.dept.deptName }} </div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<svg-icon icon-class="peoples" />所属角色
|
<svg-icon icon-class="peoples" />所属角色
|
||||||
|
|
@ -86,8 +86,8 @@ export default {
|
||||||
getUser() {
|
getUser() {
|
||||||
getUserProfile().then(response => {
|
getUserProfile().then(response => {
|
||||||
this.user = response.data
|
this.user = response.data
|
||||||
this.roleGroup = response.roleGroup
|
this.roleGroup = this.user.roles.map(item=>item.roleName).join(',')
|
||||||
this.postGroup = response.postGroup
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,14 @@ export default {
|
||||||
submit() {
|
submit() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
updateUserPwd(this.user.oldPassword, this.user.newPassword).then(response => {
|
let data={
|
||||||
|
userId:this.user.userId,
|
||||||
|
loginName:this.user.loginName,
|
||||||
|
oldPassword: this.user.oldPassword,
|
||||||
|
newPassword: this.user.newPassword,
|
||||||
|
confirmPassword: this.user.newPassword
|
||||||
|
}
|
||||||
|
updateUserPwd(data).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功")
|
this.$modal.msgSuccess("修改成功")
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,14 @@ public class SysProfileController extends BaseController
|
||||||
mmap.put("postGroup", userService.selectUserPostGroup(user.getUserId()));
|
mmap.put("postGroup", userService.selectUserPostGroup(user.getUserId()));
|
||||||
return prefix + "/profile";
|
return prefix + "/profile";
|
||||||
}
|
}
|
||||||
|
@GetMapping("/vue")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult profileVue()
|
||||||
|
{
|
||||||
|
SysUser user = getSysUser();
|
||||||
|
|
||||||
|
return AjaxResult.success(user);
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/checkPassword")
|
@GetMapping("/checkPassword")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
|
|
||||||
|
|
@ -142,6 +142,13 @@ public class ProjectOrderInfoController extends BaseController
|
||||||
// return prefix + "/approve";
|
// return prefix + "/approve";
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
@PostMapping("/order/approve/batch")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult approveOrderBatch(@RequestBody Todo todo) {
|
||||||
|
projectOrderInfoService.approveOrderBatch(todo);
|
||||||
|
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 查询订单管理列表
|
* 查询订单管理列表
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -103,4 +103,6 @@ public interface IProjectOrderInfoService
|
||||||
|
|
||||||
String financeExport(ProjectOrderInfo projectOrderInfo);
|
String financeExport(ProjectOrderInfo projectOrderInfo);
|
||||||
|
|
||||||
|
void approveOrderBatch(Todo todo);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -272,7 +272,7 @@ public class OmsInventoryInnerServiceImpl implements IOmsInventoryInnerService {
|
||||||
throw new ServiceException("产品编码对应产品未找到");
|
throw new ServiceException("产品编码对应产品未找到");
|
||||||
}
|
}
|
||||||
Map<String, OmsWarehouseInfo> warehouseInfoMap=Collections.emptyMap();
|
Map<String, OmsWarehouseInfo> warehouseInfoMap=Collections.emptyMap();
|
||||||
if ("2".equalsIgnoreCase(orderType)|| ("2".equalsIgnoreCase(productInfos.get(0).getType()) || productInfos.get(0).getVendorName().startsWith("新华三")) ){
|
if ("2".equalsIgnoreCase(orderType) || (("2".equalsIgnoreCase(productInfos.get(0).getType()) && productInfos.get(0).getVendorName().startsWith("新华三"))) ){
|
||||||
List<String> warehouseNameList = inventoryInfoExcelDtoList.stream().map(InventoryInfoExcelDto::getWarehouseName).distinct().collect(Collectors.toList());
|
List<String> warehouseNameList = inventoryInfoExcelDtoList.stream().map(InventoryInfoExcelDto::getWarehouseName).distinct().collect(Collectors.toList());
|
||||||
if (warehouseNameList.size() > 1){
|
if (warehouseNameList.size() > 1){
|
||||||
throw new ServiceException("导入清单只能有一个仓库");
|
throw new ServiceException("导入清单只能有一个仓库");
|
||||||
|
|
@ -293,7 +293,7 @@ public class OmsInventoryInnerServiceImpl implements IOmsInventoryInnerService {
|
||||||
info.setModel(productInfos.get(0).getModel());
|
info.setModel(productInfos.get(0).getModel());
|
||||||
info.setProductDesc(productInfos.get(0).getDescription());
|
info.setProductDesc(productInfos.get(0).getDescription());
|
||||||
info.setInnerPrice(item.getInnerPrice());
|
info.setInnerPrice(item.getInnerPrice());
|
||||||
if ("2".equalsIgnoreCase(orderType)){
|
if ("2".equalsIgnoreCase(orderType)|| (("2".equalsIgnoreCase(productInfos.get(0).getType()) && productInfos.get(0).getVendorName().startsWith("新华三"))) ){
|
||||||
OmsWarehouseInfo omsWarehouseInfo = finalWarehouseInfoMap.get(item.getWarehouseName());
|
OmsWarehouseInfo omsWarehouseInfo = finalWarehouseInfoMap.get(item.getWarehouseName());
|
||||||
info.setWarehouseId(omsWarehouseInfo.getId());
|
info.setWarehouseId(omsWarehouseInfo.getId());
|
||||||
info.setWarehouseName(omsWarehouseInfo.getWarehouseName());
|
info.setWarehouseName(omsWarehouseInfo.getWarehouseName());
|
||||||
|
|
|
||||||
|
|
@ -1552,6 +1552,19 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void approveOrderBatch(Todo todo) {
|
||||||
|
Todo query = new Todo();
|
||||||
|
query.setApproveUser(getSysUser().getUserId().toString());
|
||||||
|
query.setProcessKeyList(Arrays.asList(orderOnlineFlowKey,orderOfflineFlowKey));
|
||||||
|
List<Todo> list = todoService.selectTodoList(query);
|
||||||
|
for (Todo todo1 : list) {
|
||||||
|
|
||||||
|
todo1.setVariables(new HashMap<>(todo.getVariables()));
|
||||||
|
approveOrder(todo1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成第一个sheet的数据
|
* 生成第一个sheet的数据
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue