rev:仓储基础管理维护

This commit is contained in:
zhangzhiqiang
2023-05-15 11:23:04 +08:00
parent 382f8e5503
commit 535b1a6b8c
8 changed files with 33 additions and 27 deletions

View File

@@ -29,7 +29,7 @@ import java.util.List;
@RestController @RestController
@RequiredArgsConstructor @RequiredArgsConstructor
@Api(tags = "仓库管理") @Api(tags = "仓库管理")
@RequestMapping("/api/Storattr") @RequestMapping("/api/stIvtBsrealstorattr")
@Slf4j @Slf4j
public class StorattrController { public class StorattrController {

View File

@@ -92,21 +92,21 @@ public class StIvtBsrealstorattrServiceImpl extends ServiceImpl<StIvtBsrealstora
Assert.notNull(new Object[]{form,form.get("is_used"),form.get("stor_id")},"参数不能为空"); Assert.notNull(new Object[]{form,form.get("is_used"),form.get("stor_id")},"参数不能为空");
this.update(new UpdateWrapper<StIvtBsrealstorattr>() this.update(new UpdateWrapper<StIvtBsrealstorattr>()
.set("is_used",form.getString("is_used")) .set("is_used",form.getBoolean("is_used"))
.set("update_id",SecurityUtils.getCurrentUserId()) .set("update_id",SecurityUtils.getCurrentUserId())
.set("update_name",SecurityUtils.getCurrentNickName()) .set("update_name",SecurityUtils.getCurrentNickName())
.set("update_time",new Date()) .set("update_time",new Date())
.eq("stor_id",form.getString("stor_id"))); .eq("stor_id",form.getString("stor_id")));
sectattrService.update(new UpdateWrapper<StIvtSectattr>() sectattrService.update(new UpdateWrapper<StIvtSectattr>()
.set("is_used",form.getString("is_used")) .set("is_used",form.getBoolean("is_used"))
.set("update_id",SecurityUtils.getCurrentUserId()) .set("update_id",SecurityUtils.getCurrentUserId())
.set("update_name",SecurityUtils.getCurrentNickName()) .set("update_name",SecurityUtils.getCurrentNickName())
.set("update_time",new Date()) .set("update_time",new Date())
.eq("stor_id",form.getString("stor_id"))); .eq("stor_id",form.getString("stor_id")));
structattrService.update(new UpdateWrapper<StIvtStructattr>() structattrService.update(new UpdateWrapper<StIvtStructattr>()
.set("is_used",form.getString("is_used")) .set("is_used",form.getBoolean("is_used"))
.set("update_id",SecurityUtils.getCurrentUserId()) .set("update_id",SecurityUtils.getCurrentUserId())
.set("update_name",SecurityUtils.getCurrentNickName()) .set("update_name",SecurityUtils.getCurrentNickName())
.set("update_time",new Date()) .set("update_time",new Date())

View File

@@ -78,6 +78,7 @@ public class StIvtSectattrServiceImpl extends ServiceImpl<StIvtSectattrMapper, S
sectattr.setUpdate_id(SecurityUtils.getCurrentUserId()); sectattr.setUpdate_id(SecurityUtils.getCurrentUserId());
sectattr.setUpdate_name(SecurityUtils.getCurrentNickName()); sectattr.setUpdate_name(SecurityUtils.getCurrentNickName());
sectattr.setUpdate_time(new Date()); sectattr.setUpdate_time(new Date());
this.updateById(sectattr);
return sect_id; return sect_id;
} }
@@ -92,14 +93,14 @@ public class StIvtSectattrServiceImpl extends ServiceImpl<StIvtSectattrMapper, S
} }
this.update(new UpdateWrapper<StIvtSectattr>() this.update(new UpdateWrapper<StIvtSectattr>()
.set("is_used",form.getString("is_used")) .set("is_used",form.getBoolean("is_used"))
.set("update_id",SecurityUtils.getCurrentUserId()) .set("update_id",SecurityUtils.getCurrentUserId())
.set("update_name",SecurityUtils.getCurrentNickName()) .set("update_name",SecurityUtils.getCurrentNickName())
.set("update_time",new Date()) .set("update_time",new Date())
.eq("sect_id",form.getString("sect_id"))); .eq("sect_id",form.getString("sect_id")));
structattrService.update(new UpdateWrapper<StIvtStructattr>() structattrService.update(new UpdateWrapper<StIvtStructattr>()
.set("is_used",form.getString("is_used")) .set("is_used",form.getBoolean("is_used"))
.set("update_id",SecurityUtils.getCurrentUserId()) .set("update_id",SecurityUtils.getCurrentUserId())
.set("update_name",SecurityUtils.getCurrentNickName()) .set("update_name",SecurityUtils.getCurrentNickName())
.set("update_time",new Date()) .set("update_time",new Date())

View File

@@ -90,7 +90,7 @@ public class StIvtStructattrServiceImpl extends ServiceImpl<StIvtStructattrMappe
} }
this.update(new UpdateWrapper<StIvtStructattr>() this.update(new UpdateWrapper<StIvtStructattr>()
.set("is_used",form.getString("is_used")) .set("is_used",form.getBoolean("is_used"))
.set("update_id",SecurityUtils.getCurrentUserId()) .set("update_id",SecurityUtils.getCurrentUserId())
.set("update_name",SecurityUtils.getCurrentNickName()) .set("update_name",SecurityUtils.getCurrentNickName())
.set("update_time",new Date()) .set("update_time",new Date())

View File

@@ -164,7 +164,7 @@ public class StIvtIostorinvBcpServiceImpl extends ServiceImpl<StIvtIostorinvBcpM
mst.setUpdate_id(SecurityUtils.getCurrentUserId()); mst.setUpdate_id(SecurityUtils.getCurrentUserId());
mst.setUpdate_name(SecurityUtils.getCurrentNickName()); mst.setUpdate_name(SecurityUtils.getCurrentNickName());
this.updateById(mst); this.updateById(mst);
//更新仓位 //更新库存
StIvtStructivtBcp struct = structivtBcpService.getOne(new QueryWrapper<StIvtStructivtBcp>().eq("struct_code", mst.getStruct_code())); StIvtStructivtBcp struct = structivtBcpService.getOne(new QueryWrapper<StIvtStructivtBcp>().eq("struct_code", mst.getStruct_code()));
//插入库存变动表 //插入库存变动表
structivtflowService.recordStructivtFlow( structivtflowService.recordStructivtFlow(

View File

@@ -2,7 +2,7 @@ import request from '@/utils/request'
export function add(data) { export function add(data) {
return request({ return request({
url: 'api/stIvtStructattr', url: 'api/structattr',
method: 'post', method: 'post',
data data
}) })
@@ -10,7 +10,7 @@ export function add(data) {
export function del(ids) { export function del(ids) {
return request({ return request({
url: 'api/stIvtStructattr/', url: 'api/structattr/',
method: 'delete', method: 'delete',
data: ids data: ids
}) })
@@ -18,7 +18,7 @@ export function del(ids) {
export function edit(data) { export function edit(data) {
return request({ return request({
url: 'api/stIvtStructattr', url: 'api/structattr',
method: 'put', method: 'put',
data data
}) })
@@ -26,7 +26,7 @@ export function edit(data) {
export function changeActive(data) { export function changeActive(data) {
return request({ return request({
url: 'api/stIvtStructattr/stIvtStructattr', url: 'api/structattr/changeActive',
method: 'put', method: 'put',
data data
}) })
@@ -34,7 +34,7 @@ export function changeActive(data) {
export function getSectCascader(data) { export function getSectCascader(data) {
return request({ return request({
url: '/api/stIvtStructattr/getSectCascader', url: '/api/structattr/getSectCascader',
method: 'post', method: 'post',
data data
}) })

View File

@@ -146,7 +146,7 @@
:value="format_is_used(scope.row.is_used)" :value="format_is_used(scope.row.is_used)"
active-color="#409EFF" active-color="#409EFF"
inactive-color="#F56C6C" inactive-color="#F56C6C"
@change="changeEnabled(scope.row, scope.row.is_used)" @change="changeEnabled(scope.row)"
/> />
</template> </template>
</el-table-column> </el-table-column>
@@ -213,12 +213,12 @@ const defaultForm = {
back_ground_pic: null, back_ground_pic: null,
font_direction_scode: null, font_direction_scode: null,
floor_no: null, floor_no: null,
is_used: '', is_used: true,
ext_id: null ext_id: null
} }
export default { export default {
name: 'Sectattr', name: 'Sectattr',
dicts: ['st_sect_type', 'is_used'], dicts: ['st_sect_type'],
components: { pagination, crudOperation, rrOperation, udOperation }, components: { pagination, crudOperation, rrOperation, udOperation },
mixins: [presenter(), header(), form(defaultForm), crud()], mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() { cruds() {
@@ -294,18 +294,20 @@ export default {
}, },
// 改变状态 // 改变状态
format_is_used(is_used) { format_is_used(is_used) {
return is_used === '1' return is_used === true
}, },
changeEnabled(data, val) { changeEnabled(data) {
let msg = '此操作将停用,是否继续!' let msg = '此操作将停用,是否继续!'
if (val !== '1') { if (data.is_used === false) {
msg = '此操作将启用,是否继续!' msg = '此操作将启用,是否继续!'
} }
this.$confirm(msg, '提示', { this.$confirm(msg, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
data.is_used = !data.is_used
crudSectattr.changeActive(data).then(res => { crudSectattr.changeActive(data).then(res => {
this.crud.toQuery() this.crud.toQuery()
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS) this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
@@ -313,6 +315,7 @@ export default {
data.is_used = !data.is_used data.is_used = !data.is_used
}) })
}).catch(() => { }).catch(() => {
}) })
} }
} }

View File

@@ -219,7 +219,7 @@
:value="format_is_used(scope.row.is_used)" :value="format_is_used(scope.row.is_used)"
active-color="#409EFF" active-color="#409EFF"
inactive-color="#F56C6C" inactive-color="#F56C6C"
@change="changeEnabled(scope.row, scope.row.is_used)" @change="changeEnabled(scope.row)"
/> />
</template> </template>
</el-table-column> </el-table-column>
@@ -292,7 +292,7 @@ const defaultForm = {
front_ground_color: null, front_ground_color: null,
back_ground_pic: null, back_ground_pic: null,
font_direction_scode: null, font_direction_scode: null,
is_used: null, is_used: true,
is_zdepth: null, is_zdepth: null,
storagevehicle_id: null, storagevehicle_id: null,
storagevehicle_code: null, storagevehicle_code: null,
@@ -306,7 +306,7 @@ const defaultForm = {
} }
export default { export default {
name: 'Structattr', name: 'Structattr',
dicts: ['ST_HEIGHT_TYPE', 'is_used', 'd_lock_type', 'SCH_TASK_TYPE_DTL'], dicts: ['ST_HEIGHT_TYPE', 'd_lock_type', 'SCH_TASK_TYPE_DTL'],
components: { pagination, crudOperation, rrOperation, udOperation }, components: { pagination, crudOperation, rrOperation, udOperation },
mixins: [presenter(), header(), form(defaultForm), crud()], mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() { cruds() {
@@ -427,18 +427,20 @@ export default {
}, },
// 改变状态 // 改变状态
format_is_used(is_used) { format_is_used(is_used) {
return is_used === '1' return is_used === true
}, },
changeEnabled(data, val) { changeEnabled(data) {
let msg = '此操作将停用,是否继续!' let msg = '此操作将停用,是否继续2'
if (val !== '1') { if (data.is_used === false) {
msg = '此操作将启用,是否继续!' msg = '此操作将启用,是否继续2'
} }
this.$confirm(msg, '提示', { this.$confirm(msg, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
data.is_used = !data.is_used
crudStructattr.changeActive(data).then(res => { crudStructattr.changeActive(data).then(res => {
this.crud.toQuery() this.crud.toQuery()
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS) this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)