更新计量单位为多单位

This commit is contained in:
jishenghua
2024-12-18 00:02:06 +08:00
parent 1ba766b2dc
commit 6f294fad62
7 changed files with 15 additions and 15 deletions

View File

@@ -286,7 +286,7 @@ public class ExceptionConstants {
public static final String MATERIAL_BARCODE_EXISTS_MSG = "商品条码:%s重复"; public static final String MATERIAL_BARCODE_EXISTS_MSG = "商品条码:%s重复";
//商品-单位匹配不上 //商品-单位匹配不上
public static final int MATERIAL_UNIT_MATE_CODE = 8000006; public static final int MATERIAL_UNIT_MATE_CODE = 8000006;
public static final String MATERIAL_UNIT_MATE_MSG = "抱歉,商品条码:%s的单位匹配不上请完善计量单位信息!"; public static final String MATERIAL_UNIT_MATE_MSG = "抱歉,商品条码:%s的单位匹配不上请完善单位信息!";
//商品条码长度应该为4到40位 //商品条码长度应该为4到40位
public static final int MATERIAL_BARCODE_LENGTH_ERROR_CODE = 8000007; public static final int MATERIAL_BARCODE_LENGTH_ERROR_CODE = 8000007;
public static final String MATERIAL_BARCODE_LENGTH_ERROR_MSG = "商品条码:%s的长度应该为4到40位"; public static final String MATERIAL_BARCODE_LENGTH_ERROR_MSG = "商品条码:%s的长度应该为4到40位";

View File

@@ -229,7 +229,7 @@ public class DepotItemController {
item.put("mfrs", diEx.getMMfrs()); item.put("mfrs", diEx.getMMfrs());
item.put("materialOther", depotItemService.getOtherInfo(mpArr, diEx)); item.put("materialOther", depotItemService.getOtherInfo(mpArr, diEx));
BigDecimal stock; BigDecimal stock;
Unit unitInfo = materialService.findUnit(diEx.getMaterialId()); //查询计量单位信息 Unit unitInfo = materialService.findUnit(diEx.getMaterialId()); //查询单位信息
String materialUnit = diEx.getMaterialUnit(); String materialUnit = diEx.getMaterialUnit();
if(StringUtil.isNotEmpty(diEx.getSku())){ if(StringUtil.isNotEmpty(diEx.getSku())){
stock = depotItemService.getSkuStockByParam(diEx.getDepotId(),diEx.getMaterialExtendId(),null,null); stock = depotItemService.getSkuStockByParam(diEx.getDepotId(),diEx.getMaterialExtendId(),null,null);

View File

@@ -505,7 +505,7 @@ public class DepotItemService {
depotItem.setLinkId(rowObj.getLong("linkId")); depotItem.setLinkId(rowObj.getLong("linkId"));
} }
//以下进行单位换算 //以下进行单位换算
Unit unitInfo = materialService.findUnit(materialExtend.getMaterialId()); //查询计量单位信息 Unit unitInfo = materialService.findUnit(materialExtend.getMaterialId()); //查询单位信息
if (StringUtil.isExist(rowObj.get("operNumber"))) { if (StringUtil.isExist(rowObj.get("operNumber"))) {
depotItem.setOperNumber(rowObj.getBigDecimal("operNumber")); depotItem.setOperNumber(rowObj.getBigDecimal("operNumber"));
String unit = rowObj.get("unit").toString(); String unit = rowObj.get("unit").toString();
@@ -1071,7 +1071,7 @@ public class DepotItemService {
public void updateCurrentUnitPrice(DepotItem depotItem) throws Exception { public void updateCurrentUnitPrice(DepotItem depotItem) throws Exception {
Boolean forceFlag = systemConfigService.getForceApprovalFlag(); Boolean forceFlag = systemConfigService.getForceApprovalFlag();
Boolean inOutManageFlag = systemConfigService.getInOutManageFlag(); Boolean inOutManageFlag = systemConfigService.getInOutManageFlag();
//查询计量单位信息 //查询单位信息
Unit unitInfo = materialService.findUnit(depotItem.getMaterialId()); Unit unitInfo = materialService.findUnit(depotItem.getMaterialId());
List<DepotItemVo4DetailByTypeAndMId> itemList = findDetailByDepotIdsAndMaterialIdList(null, forceFlag, inOutManageFlag, depotItem.getSku(), List<DepotItemVo4DetailByTypeAndMId> itemList = findDetailByDepotIdsAndMaterialIdList(null, forceFlag, inOutManageFlag, depotItem.getSku(),
depotItem.getBatchNumber(), null, null, null, depotItem.getMaterialId(), null, null); depotItem.getBatchNumber(), null, null, null, depotItem.getMaterialId(), null, null);

View File

@@ -108,7 +108,7 @@ public class UnitService {
parseNameByUnit(unit); parseNameByUnit(unit);
unit.setEnabled(true); unit.setEnabled(true);
result=unitMapper.insertSelective(unit); result=unitMapper.insertSelective(unit);
logService.insertLog("计量单位", logService.insertLog("单位",
new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_ADD).append(unit.getName()).toString(), request); new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_ADD).append(unit.getName()).toString(), request);
}catch(Exception e){ }catch(Exception e){
JshException.writeFail(logger, e); JshException.writeFail(logger, e);
@@ -129,7 +129,7 @@ public class UnitService {
if(unit.getRatioThree()==null) { if(unit.getRatioThree()==null) {
unitMapperEx.updateRatioThreeById(unit.getId()); unitMapperEx.updateRatioThreeById(unit.getId());
} }
logService.insertLog("计量单位", logService.insertLog("单位",
new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_EDIT).append(unit.getName()).toString(), request); new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_EDIT).append(unit.getName()).toString(), request);
}catch(Exception e){ }catch(Exception e){
JshException.writeFail(logger, e); JshException.writeFail(logger, e);
@@ -186,7 +186,7 @@ public class UnitService {
for(Unit unit: list){ for(Unit unit: list){
sb.append("[").append(unit.getName()).append("]"); sb.append("[").append(unit.getName()).append("]");
} }
logService.insertLog("计量单位", sb.toString(), logService.insertLog("单位", sb.toString(),
((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest()); ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest());
User userInfo=userService.getCurrentUser(); User userInfo=userService.getCurrentUser();
//校验通过执行删除操作 //校验通过执行删除操作
@@ -291,7 +291,7 @@ public class UnitService {
@Transactional(value = "transactionManager", rollbackFor = Exception.class) @Transactional(value = "transactionManager", rollbackFor = Exception.class)
public int batchSetStatus(Boolean status, String ids)throws Exception { public int batchSetStatus(Boolean status, String ids)throws Exception {
logService.insertLog("计量单位", logService.insertLog("单位",
new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_ENABLED).toString(), new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_ENABLED).toString(),
((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest()); ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest());
List<Long> unitIds = StringUtil.strToLongList(ids); List<Long> unitIds = StringUtil.strToLongList(ids);

View File

@@ -94,7 +94,7 @@ const addUserBusiness = (params)=>postAction("/userBusiness/add",params);
const editUserBusiness = (params)=>putAction("/userBusiness/update",params); const editUserBusiness = (params)=>putAction("/userBusiness/update",params);
const checkUserBusiness = (params)=>getAction("/userBusiness/checkIsValueExist",params); const checkUserBusiness = (params)=>getAction("/userBusiness/checkIsValueExist",params);
const updateBtnStrByRoleId = (params)=>postAction("/userBusiness/updateBtnStr",params); const updateBtnStrByRoleId = (params)=>postAction("/userBusiness/updateBtnStr",params);
//计量单位 //单位
const addUnit = (params)=>postAction("/unit/add",params); const addUnit = (params)=>postAction("/unit/add",params);
const editUnit = (params)=>putAction("/unit/update",params); const editUnit = (params)=>putAction("/unit/update",params);
const checkUnit = (params)=>getAction("/unit/checkIsNameExist",params); const checkUnit = (params)=>getAction("/unit/checkIsNameExist",params);

View File

@@ -37,7 +37,7 @@
</a-col> </a-col>
<a-col :md="6" :sm="24"> <a-col :md="6" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单位" <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单位"
data-step="4" data-title="单位" data-intro="此处支持单个单位和多单位勾选多单位就可以切换到多单位的下拉框多单位需要先在计量单位页面进行录入 data-step="4" data-title="单位" data-intro="此处支持单个单位和多单位勾选多单位就可以切换到多单位的下拉框多单位需要先在单位页面进行录入
比如牛奶有瓶和箱两种单位12瓶=1箱这就构成了多单位多单位中有个换算比例"> 比如牛奶有瓶和箱两种单位12瓶=1箱这就构成了多单位多单位中有个换算比例">
<a-row class="form-row" :gutter="24"> <a-row class="form-row" :gutter="24">
<a-col :lg="15" :md="15" :sm="24" style="padding:0px 0px 0px 12px;"> <a-col :lg="15" :md="15" :sm="24" style="padding:0px 0px 0px 12px;">
@@ -48,7 +48,7 @@
<v-nodes :vnodes="menu" /> <v-nodes :vnodes="menu" />
<a-divider style="margin: 4px 0;" /> <a-divider style="margin: 4px 0;" />
<div style="padding: 4px 8px; cursor: pointer;" <div style="padding: 4px 8px; cursor: pointer;"
@mousedown="e => e.preventDefault()" @click="addUnit"><a-icon type="plus" /> 新增计量单位</div> @mousedown="e => e.preventDefault()" @click="addUnit"><a-icon type="plus" /> 新增单位</div>
</div> </div>
<a-select-option v-for="(item,index) in unitList" <a-select-option v-for="(item,index) in unitList"
:key="index" :value="item.id"> :key="index" :value="item.id">
@@ -1234,7 +1234,7 @@
}, },
addUnit() { addUnit() {
this.$refs.unitModalForm.add(); this.$refs.unitModalForm.add();
this.$refs.unitModalForm.title = "新增计量单位"; this.$refs.unitModalForm.title = "新增单位";
this.$refs.unitModalForm.disableSubmit = false; this.$refs.unitModalForm.disableSubmit = false;
}, },
unitModalFormOk() { unitModalFormOk() {

View File

@@ -8,8 +8,8 @@
<a-form layout="inline" @keyup.enter.native="searchQuery"> <a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :md="6" :sm="24"> <a-col :md="6" :sm="24">
<a-form-item label="计量单位" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="单位名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入计量单位查询" v-model="queryParam.name"></a-input> <a-input placeholder="请输入单位名称查询" v-model="queryParam.name"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
@@ -105,7 +105,7 @@
align:"center", align:"center",
scopedSlots: { customRender: 'action' }, scopedSlots: { customRender: 'action' },
}, },
{ title: '计量单位', align:"left", dataIndex: 'name', width:200 }, { title: '单位名称', align:"left", dataIndex: 'name', width:200 },
{ title: '基本单位', align:"left", dataIndex: 'basicUnit', width:80 }, { title: '基本单位', align:"left", dataIndex: 'basicUnit', width:80 },
{ title: '副单位', align:"left", dataIndex: 'otherUnit', width:100, { title: '副单位', align:"left", dataIndex: 'otherUnit', width:100,
customRender:function (t,r,index) { customRender:function (t,r,index) {