Commit 358760de by wangchunyang
parents 82fd5953 6dd5c256
......@@ -133,7 +133,6 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="排序" align="center" prop="sortNo" width="80" />
<el-table-column label="创建日期" align="center" prop="createTime" width="160" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120" fixed="right">
<template slot-scope="scope">
......@@ -232,19 +231,6 @@
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="排序" prop="sortNo">
<el-input-number
v-model="form.sortNo"
placeholder="请输入排序"
:min="0"
:step="1"
style="width: 100%"
/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="仓库地点" prop="address">
<el-input v-model="form.address" type="textarea" placeholder="请输入内容" :rows="3" />
......@@ -374,10 +360,6 @@ export default {
isEnabled: [
{ required: true, message: '应用状态不能为空', trigger: 'change' }
],
sortNo: [
{ required: true, message: '排序不能为空', trigger: 'blur' },
{ type: 'number', message: '排序必须为数字值', trigger: 'blur' }
],
area: [
{
validator: (rule, value, callback) => {
......
......@@ -49,7 +49,21 @@ public class StorageLocationsServiceImpl implements IStorageLocationsService
@Override
public StorageLocations selectStorageLocationsById(String id)
{
return storageLocationsMapper.selectStorageLocationsById(id);
StorageLocations storageLocations = storageLocationsMapper.selectStorageLocationsById(id);
String[] AllowedCategoryIds = storageLocations.getAllowedCategoryIds().split(",");
String AllowedCategoryName = "";
for (String AllowedCategoryId : AllowedCategoryIds) {
Materials materials = materialsMapper.selectMaterialsById(AllowedCategoryId);
if (materials != null && materials.getMaterialName() != null) {
String categoryName = materials.getMaterialName().trim(); // 去除首尾空格
if (AllowedCategoryName != "") {
AllowedCategoryName += ",";
}
AllowedCategoryName += categoryName;
}
}
storageLocations.setAllowedCategoryNames(AllowedCategoryName);
return storageLocations;
}
@Override
......@@ -77,18 +91,14 @@ public class StorageLocationsServiceImpl implements IStorageLocationsService
if (storageLocations2.getAllowedCategoryIds() != null && !storageLocations2.getAllowedCategoryIds().isEmpty()){
String[] AllowedCategoryIds = storageLocations2.getAllowedCategoryIds().split(",");
for (String AllowedCategoryId : AllowedCategoryIds) {
List<Materials> materials = materialsMapper.selectMaterialsBySapNo(AllowedCategoryId);
if (materials != null && !materials.isEmpty()) {
Materials materials1 = materials.get(0);
if (materials1 != null && materials1.getMaterialName() != null) {
String categoryName = materials1.getMaterialName().trim(); // 去除首尾空格
Materials materials = materialsMapper.selectMaterialsById(AllowedCategoryId);
if (materials != null && materials.getMaterialName() != null) {
String categoryName = materials.getMaterialName().trim(); // 去除首尾空格
if (AllowedCategoryName != "") {
AllowedCategoryName += ",";
}
AllowedCategoryName += categoryName;
} }
}
}
}
storageLocations2.setAllowedCategoryNames(AllowedCategoryName);
......@@ -123,11 +133,8 @@ public class StorageLocationsServiceImpl implements IStorageLocationsService
storageLocationsCategory.setCategoryId(categoryId);
storageLocationsCategory.setCreateTime(DateUtils.getNowDate());
storageLocationsCategory.setCreateUserCode(String.valueOf(SecurityUtils.getUserId()));
List<Materials> materials = materialsMapper.selectMaterialsBySapNo(categoryId);
if (materials != null && !materials.isEmpty()) {
Materials materials1 = materials.get(0);
storageLocationsCategory.setCategoryName(materials1.getMaterialName());
}
Materials materials = materialsMapper.selectMaterialsById(categoryId);
storageLocationsCategory.setCategoryName(materials.getMaterialName());
storageLocationsCategoryMapper.insertStorageLocationsCategory(storageLocationsCategory);
}
}
......@@ -162,11 +169,8 @@ public class StorageLocationsServiceImpl implements IStorageLocationsService
storageLocationsCategory.setCategoryId(categoryId);
storageLocationsCategory.setUpdateTime(DateUtils.getNowDate());
storageLocationsCategory.setUpdateUserCode(String.valueOf(SecurityUtils.getUserId()));
List<Materials> materials = materialsMapper.selectMaterialsBySapNo(categoryId);
if (materials != null && !materials.isEmpty()) {
Materials materials1 = materials.get(0);
storageLocationsCategory.setCategoryName(materials1.getMaterialName());
}
Materials materials = materialsMapper.selectMaterialsById(categoryId);
storageLocationsCategory.setCategoryName(materials.getMaterialName());
storageLocationsCategoryMapper.insertStorageLocationsCategory(storageLocationsCategory);
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论