feat(inventory): 新增库存备货状态展示功能
- 在库存列表中增加“是否曾经备货”字段展示 - 根据onceInStock字段值显示不同颜色标识 - 后端实体类OmsStockInfo新增onceInStock属性 - 数据库映射文件添加once_in_stock字段插入逻辑 - 新增插入时校验历史备货状态逻辑 - 修改项目订单服务依赖注入接口方式 - 调整用户头像上传接口路径及默认图片格式 - 更新前端用户头像路径拼接逻辑以支持资源下载dev_1.0.0
parent
bb79ce79bd
commit
357010e7ee
|
|
@ -106,7 +106,7 @@ export function updateUserPwd(oldPassword, newPassword) {
|
|||
// 用户头像上传
|
||||
export function uploadAvatar(data) {
|
||||
return request({
|
||||
url: '/system/user/profile/avatar',
|
||||
url: '/system/user/profile/updateAvatar',
|
||||
method: 'post',
|
||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
||||
data: data
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 79 KiB |
|
|
@ -2,7 +2,7 @@ import router from '@/router'
|
|||
import { MessageBox, } from 'element-ui'
|
||||
import { login, logout, getInfo } from '@/api/login'
|
||||
import { isHttp, isEmpty } from "@/utils/validate"
|
||||
import defAva from '@/assets/images/profile.jpg'
|
||||
import defAva from '@/assets/images/profile.png'
|
||||
|
||||
const user = {
|
||||
state: {
|
||||
|
|
@ -66,7 +66,7 @@ const user = {
|
|||
// 后端返回的数据在 res.data 中
|
||||
const data = res.data || res
|
||||
const user = data.user
|
||||
let avatar = user.avatar || ""
|
||||
let avatar = user.avatar? '/common/download/resource?resource='+encodeURIComponent(user.avatar) : ""
|
||||
if (!isHttp(avatar)) {
|
||||
avatar = (isEmpty(avatar)) ? defAva : process.env.VUE_APP_BASE_API + avatar
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,6 +73,11 @@
|
|||
<span>{{ scope.row.stockStatus === '0' ? '待备货' : '已备货' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否曾经备货" align="center" prop="stockStatus" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{'color': scope.row.onceInStock==='1' ? 'red' : ''}">{{ (scope.row.onceInStock||'0') === '0' ? '未备货' : '曾经备货' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" prop="allQuantity" width="100" />
|
||||
<el-table-column label="备货地址" align="center" prop="notifierAddress" width="300" show-overflow-tooltip />
|
||||
<el-table-column label="联系人" align="center" prop="notifier" width="100" />
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ public class OmsStockInfo {
|
|||
* 备货状态 0:未备货 1:已备货
|
||||
*/
|
||||
private String stockStatus;
|
||||
private String onceInStock;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -40,6 +40,10 @@ public class OmsStockInfoServiceImpl implements IOmsStockInfoService {
|
|||
|
||||
@Override
|
||||
public int insert(OmsStockInfo omsStockInfo) {
|
||||
//需要验证数据
|
||||
List<OmsStockInfo> omsStockInfos = omsStockInfoMapper.queryAll(omsStockInfo);
|
||||
boolean b = omsStockInfos.stream().anyMatch(item -> "1".equalsIgnoreCase(item.getStockStatus()));
|
||||
omsStockInfo.setOnceInStock(b ? "1" : "0");
|
||||
return omsStockInfoMapper.insert(omsStockInfo);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
|||
private static final List<String> REJECT_EMAIL_LIST = Arrays.asList("li.junjie@unisinsight.com", "chen.shenggang@unisinsight.com");
|
||||
|
||||
@Autowired
|
||||
private OmsStockInfoMapper omsStockInfoMapper;
|
||||
private IOmsStockInfoService omsStockInfoService;
|
||||
@Autowired
|
||||
private IProjectTaxRateTempService projectTaxRateTempService;
|
||||
@Value("${unis.order.endHour:96}")
|
||||
|
|
@ -1218,7 +1218,7 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
|||
private void addStock(String businessKey) {
|
||||
OmsStockInfo omsStockInfo = new OmsStockInfo();
|
||||
omsStockInfo.setOrderCode(businessKey);
|
||||
omsStockInfoMapper.insert(omsStockInfo);
|
||||
omsStockInfoService.insert(omsStockInfo);
|
||||
}
|
||||
|
||||
// @Override
|
||||
|
|
|
|||
|
|
@ -98,6 +98,9 @@
|
|||
<if test="stockStatus != null and stockStatus != ''">
|
||||
stock_status,
|
||||
</if>
|
||||
<if test="onceInStock != null and onceInStock != ''">
|
||||
once_in_stock,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
|
|
@ -109,6 +112,9 @@
|
|||
<if test="stockStatus != null and stockStatus != ''">
|
||||
#{stockStatus},
|
||||
</if>
|
||||
<if test="onceInStock != null and onceInStock != ''">
|
||||
#{onceInStock},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime},
|
||||
</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue